/* Ensure dropdown styles work even if Tailwind classes fail */
.crypto-dropdown-wrapper, .currency-dropdown-wrapper, .unified-dropdown-wrapper {
    position: relative;
}

.crypto-dropdown-button, .currency-dropdown-button, .unified-dropdown-button {
    width: 100%;
    background-color: #374151;
    border: 1px solid #4B5563;
    color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.crypto-dropdown-button:hover, .currency-dropdown-button:hover, .unified-dropdown-button:hover {
    border-color: #6B7280;
}

.crypto-dropdown-button:focus, .currency-dropdown-button:focus, .unified-dropdown-button:focus {
    outline: none;
    ring: 2px;
    ring-color: #3B82F6;
    border-color: transparent;
}

.crypto-dropdown-panel, .currency-dropdown-panel, .unified-dropdown-panel {
    position: absolute;
    z-index: 50;
    width: 100%;
    margin-top: 0.25rem;
    background-color: #374151;
    border: 1px solid #4B5563;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.crypto-dropdown-panel.hidden, .currency-dropdown-panel.hidden, .unified-dropdown-panel.hidden {
    display: none;
}

.crypto-search-input, .currency-search-input, .unified-search-input {
    width: 100%;
    background-color: #1F2937;
    border: 1px solid #6B7280;
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    line-height: 1.5; /* Ensure consistent line height */
}

/* Ensure search icon container has proper positioning */
.unified-dropdown-panel .relative {
    display: flex;
    align-items: center;
}

/* Make sure search icon is properly centered */
.unified-dropdown-panel .relative svg {
    position: absolute;
    left: 0.75rem;
    top: 0.625rem; /* Use exact positioning like FX converter */
    pointer-events: none;
}

.crypto-search-input:focus, .currency-search-input:focus, .unified-search-input:focus {
    outline: none;
    ring: 2px;
    ring-color: #3B82F6;
    border-color: transparent;
}

.crypto-list, .currency-list, .unified-list {
    max-height: 300px;
    overflow-y: auto;
}

.crypto-item, .currency-item, .unified-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    min-height: 4rem; /* Add minimum height for larger crypto icons */
}

.crypto-item:hover, .currency-item:hover, .unified-item:hover {
    background-color: #4B5563;
}

.crypto-item.highlighted, .currency-item.highlighted, .unified-item.highlighted {
    background-color: #4B5563;
}

.crypto-icon, .flag-icon {
    width: 36px;
    height: 24px;
    margin-right: 0.75rem;
    border-radius: 2px;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Allow Tailwind classes to override for unified dropdown icons */
.unified-icon {
    margin-right: 0.75rem;
    border-radius: 2px;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Only set default size if no Tailwind size classes are present */
.unified-icon:not([class*="w-"]):not([class*="h-"]) {
    width: 36px;
    height: 24px;
}

.crypto-flag, .currency-flag {
    width: 36px;
    height: 24px;
    border-radius: 2px;
    object-fit: contain;
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Green styling for conversion result */
.result-price {
    color: #10B981;
    font-weight: bold;
}

/* Ensure result display stays inline and handles properly sized icons */
#crypto-conversion-result {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.125rem; /* Minimized gap for tighter spacing */
    min-height: 4rem; /* Reduced significantly for smaller icons */
    line-height: 1.2;
}

/* Crypto icons in results - 50% smaller and properly aligned */
.crypto-result-icon {
    display: inline-block;
    width: 4.5rem; /* 72px - 50% of original large size */
    height: 4.5rem;
    vertical-align: middle;
    border-radius: 50%; /* Make crypto icons circular for better aesthetics */
    object-fit: cover;
    margin: 0 0.125rem; /* Minimized margin for tightest spacing */
}

#crypto-conversion-result img {
    vertical-align: middle;
    display: inline-block;
    width: 4.5rem; /* 18 * 0.25rem = 4.5rem (72px) */
    height: 4.5rem;
    max-height: 4.5rem;
    border-radius: 50%; /* Make crypto icons circular for better aesthetics */
    object-fit: cover;
    margin: 0 0.125rem; /* Minimized margin for tightest spacing */
}

/* Ensure text and icons align properly */
#crypto-conversion-result .result-price {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem; /* Minimized gap for tighter spacing */
}

/* Swap button rotation animation */
#swap-crypto-currency {
    transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
}

#swap-crypto-currency.rotate-180 {
    transform: rotate(180deg);
}

#swap-crypto-currency:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Hide number input spinner controls in all browsers */
#crypto-amount-input {
    -moz-appearance: textfield; /* Firefox */
}

#crypto-amount-input::-webkit-outer-spin-button,
#crypto-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Chrome, Safari, Edge */
    margin: 0;
}

/* Click to copy result functionality */
#crypto-result-display.copied {
    background-color: rgb(34 197 94 / 0.2) !important;
    border-color: rgb(34 197 94 / 0.5) !important;
    animation: copy-feedback 2s ease-in-out;
}

@keyframes copy-feedback {
    0% { background-color: rgb(34 197 94 / 0.2); }
    20% { background-color: rgb(34 197 94 / 0.3); }
    40% { background-color: rgb(34 197 94 / 0.2); }
    100% { background-color: rgb(31 41 55); }
} 