/* Currency Exchange Rates Stylesheet - Simplified */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: clamp(0.5rem, 1vw, 1.5rem);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rate-container {
    background: white;
    border-radius: clamp(1rem, 2vw, 2rem);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.3);
    padding: clamp(1rem, 2vw, 2.5rem);
    width: 98%;
    max-height: 98vh;
    overflow-y: auto;
    border: 0.3rem solid #FFB200;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: clamp(1rem, 2vw, 2rem);
    border-bottom: 0.3rem solid #FFB200;
    padding-bottom: clamp(0.75rem, 1.5vw, 1.5rem);
}

.title {
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    background: linear-gradient(135deg, #FFC729 0%, #E09200 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: clamp(0.5rem, 1vw, 1rem);
    text-transform: uppercase;
}

.subtitle {
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    color: #FFB200;
    font-weight: 600;
    margin-bottom: clamp(0.5rem, 1vw, 1rem);
}

.timestamp {
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    color: #666;
    font-weight: 500;
}

/* Table Styles */
.rate-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(224, 146, 0, 0.15);
}

.rate-table thead th {
    background: linear-gradient(135deg, #FFC729 0%, #E09200 100%);
    color: white;
    font-weight: 700;
    padding: clamp(1.2rem, 2.5vw, 2rem);
    font-size: clamp(1rem, 2vw, 1.6rem);
    text-align: center;
    border-bottom: 0.3rem solid #E09200;
    text-transform: uppercase;
}

.rate-table thead th:first-child {
    text-align: left;
    border-top-left-radius: 1rem;
}

.rate-table thead th:last-child {
    border-top-right-radius: 1rem;
}

.rate-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 0.1rem solid #f5f5f5;
}

.rate-table tbody tr:hover {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
    transform: scale(1.01);
    box-shadow: 0 0.3rem 0.8rem rgba(224, 146, 0, 0.1);
}

.rate-table tbody tr:last-child {
    border-bottom: none;
}

.rate-table td {
    padding: clamp(1rem, 2.5vw, 1.8rem);
    font-size: clamp(0.95rem, 2vw, 1.5rem);
    text-align: center;
}

/* Currency Pair Cell */
.currency-pair-cell {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1.2rem);
    text-align: left !important;
}

.flags-container {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1vw, 0.8rem);
    flex-shrink: 1;
}

.owl-carousel .owl-item .flag {
    width: clamp(2.5rem, 5vw, 4.5rem);
    height: clamp(1.67rem, 3.33vw, 3rem);
    border-radius: 0.4rem;
    object-fit: cover;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.arrow-separator {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    background: linear-gradient(135deg, #FFC729 0%, #E09200 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    flex-shrink: 0;
}

.pair-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.pair-code {
    font-weight: 800;
    color: #FFB200;
    font-size: clamp(1.1rem, 2.2vw, 1.8rem);
}

.pair-name {
    font-size: clamp(0.85rem, 1.7vw, 1.3rem);
    color: #888;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rate-value {
    color: #333;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.6rem);
}

/* Disclaimer */
.disclaimer {
    margin-top: clamp(1rem, 2vw, 1.5rem);
    padding: clamp(0.75rem, 1.5vw, 1.2rem);
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
    border-left: 0.4rem solid #FFB200;
    border-radius: 0.5rem;
    text-align: center;
}

.disclaimer-text {
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    color: #E09200;
    font-weight: 600;
}

/* Owl Carousel Styles */
.carousel-page {
    width: 100%;
}

.owl-carousel .owl-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.owl-carousel .owl-dots {
    text-align: center;
    margin-top: clamp(1rem, 2vw, 1.5rem);
}

.owl-carousel .owl-dot {
    display: inline-block;
    margin: 0 clamp(0.3rem, 0.6vw, 0.5rem);
}

.owl-carousel .owl-dot span {
    width: clamp(0.7rem, 1.4vw, 1.1rem);
    height: clamp(0.7rem, 1.4vw, 1.1rem);
    border-radius: 50%;
    background: #ddd;
    border: 0.15rem solid #ccc;
    display: block;
    transition: all 0.3s ease;
}

.owl-carousel .owl-dot.active span,
.owl-carousel .owl-dot:hover span {
    background: linear-gradient(135deg, #FFC729 0%, #E09200 100%);
    border-color: #E09200;
    transform: scale(1.3);
    box-shadow: 0 0.3rem 0.8rem rgba(224, 146, 0, 0.4);
}

/* Iframe Mode */
body.iframe-mode {
    background: transparent;
    padding: 0;
    min-height: 0;
    display: block;
}

body.iframe-mode .rate-container {
    transform: scale(0.7);
    transform-origin: top center;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow-y: visible;
}

/* Tablet and below - remove scaling */
@media (max-width: 1200px) {
    body.iframe-mode .rate-container {
        transform: scale(1);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    body.iframe-mode {
        padding: 0;
    }
    
    body.iframe-mode .rate-container {
        transform: scale(1);
    }
    
    .rate-container {
        padding: 0.75rem;
    }
    
    .header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .title {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .timestamp {
        font-size: 0.7rem;
    }
    
    .rate-table thead th {
        padding: 0.6rem 0.2rem;
        font-size: 0.65rem;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
        word-break: break-word;
    }
    
    /* Remove hide-mobile for TT columns - show them */
    .hide-mobile {
        display: table-cell !important;
    }
    
    .rate-table td {
        padding: 0.5rem 0.15rem;
        font-size: 0.8rem;
    }
    
    .rate-table td:first-child {
        padding: 0.5rem 0.1rem;
    }
    
    .currency-pair-cell {
        flex-direction: column;
        gap: 0.2rem;
        align-items: center;
        justify-content: center;
    }
    
    .flags-container {
        gap: 0.3rem;
        align-items: center;
        flex: 0 0 auto;
    }
    
    /* Show both flags and arrow in mobile - comment out hiding rule */
    /* .flags-container .flag:first-child,
    .flags-container .arrow-separator {
        display: none;
    } */
    
    .hide-mobile-inline {
        display: inline;  /* Show "AUD/" part so it displays as "AUD/USD" */
    }
    
    .owl-carousel .owl-item .flag {
        width: 2rem;
        height: 1.33rem;
    }
    
    .pair-info {
        display: flex;
        flex-direction: row;
        gap: 0;
        align-items: center;
    }
    
    .pair-code {
        font-size: 0.85rem;
        font-weight: 900;
        white-space: nowrap;
    }
    
    /* Hide currency name in mobile */
    .pair-name {
        display: none;
    }
    
    .rate-value {
        font-size: 0.85rem;
        font-weight: 700;
    }
    
    .disclaimer {
        margin-top: 0.75rem;
        padding: 0.6rem;
    }
    
    .disclaimer-text {
        font-size: 0.65rem;
    }
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem;
    color: #e74c3c;
    font-weight: 600;
    font-size: 1.2rem;
}