/* Exchange page specific styles */

/* Fix keyboard push issue */
.exchange-header {
    position: sticky;
    top: 0;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 16px 20px !important;
    margin: 0 !important;
}

/* Make main content scrollable and account for keyboard */
.container {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 90px; /* Space for bottom nav */
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Exchange balance cards - grid layout */
.exchange-balances-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.exchange-balance-card {
    background: rgba(18, 25, 44, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exchange-balance-card:active {
    transform: scale(0.95);
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(18, 25, 44, 1);
}

.exchange-currency-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: transparent;
    display: block;
}

/* Align USDT icon nicely if image used later */
.exchange-currency-icon.usdt,
img.usdt-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.exchange-icon-emoji {
    font-size: 32px;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exchange-balance-info {
    text-align: center;
    width: 100%;
}

.exchange-balance-label {
    font-size: 13px;
    color: #A0AEC0;
    margin-bottom: 4px;
}

.exchange-balance-value {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

/* Form inputs - prevent keyboard overlay issues */
.form-input, .form-select {
    font-size: 16px !important; /* Prevents iOS zoom */
    -webkit-appearance: none;
    appearance: none;
}

/* Ensure content doesn't jump when keyboard appears */
@supports (-webkit-touch-callout: none) {
    /* iOS specific */
    .container {
        height: 100svh; /* Use small viewport height */
    }
}

/* Hide bottom nav when keyboard is open */
.keyboard-open .bottom-nav {
    display: none;
}

.keyboard-open .container {
    padding-bottom: 20px;
}

/* Hide scrollbar but allow scrolling */
.container::-webkit-scrollbar {
    display: none;
}

.container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
