/**
 * Currency Rate Display Styles
 * For simplified rate view template
 */

/* Reset and Base Styles */
.currency-rate-wrapper * {
    box-sizing: border-box;
}

.currency-rate-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Container */
.currency-rate-container {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Tabs */
.rate-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.rate-tab {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
    outline: none;
}

.rate-tab:hover {
    color: #1a1a1a;
}

.rate-tab.active {
    color: #00a651;
}

.rate-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #00a651;
}

/* Main Content */
.rate-content {
    width: 100%;
}

.rate-main {
    margin-bottom: 30px;
}

/* Currency Pair */
.rate-pair {
    margin-bottom: 15px;
}

.rate-currency-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rate-flag-icon {
    font-size: 20px;
    line-height: 1;
}

.rate-country-label {
    font-size: 14px;
    color: #666;
}

.rate-currency-code-wrapper {
    margin-bottom: 10px;
}

.rate-currency-code {
    font-size: 32px;
    font-weight: 300;
    color: #b8b8b8;
    letter-spacing: -0.5px;
}

/* Rate Display */
.rate-display {
    margin-bottom: 15px;
}

.rate-value {
    font-size: 72px;
    font-weight: 300;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 10px;
}

.rate-change {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.rate-change-value {
    color: #dc3545;
}

.rate-change-value.positive {
    color: #28a745;
}

.rate-change-percent {
    color: #dc3545;
}

.rate-change-percent.positive {
    color: #28a745;
}

/* Timestamp */
.rate-timestamp {
    font-size: 14px;
    color: #999;
}

/* Chart Section */
.rate-chart {
    margin-top: 40px;
}

.rate-chart-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.rate-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 20px;
}

.rate-chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #999;
}

#rate-chart-canvas {
    width: 100%;
    height: 100%;
}

/* Hidden Data Container */
.rate-data {
    display: none;
}

/* Loading State */
.currency-rate-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .currency-rate-wrapper {
        padding: 15px;
    }

    .currency-rate-container {
        padding: 25px 20px;
    }

    .rate-tabs {
        margin-bottom: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rate-tab {
        padding: 10px 18px;
        font-size: 14px;
        white-space: nowrap;
    }

    .rate-currency-code {
        font-size: 24px;
    }

    .rate-value {
        font-size: 56px;
    }

    .rate-change {
        font-size: 16px;
    }

    .rate-chart-container {
        height: 300px;
        padding: 15px;
    }

    .rate-chart-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .currency-rate-wrapper {
        padding: 10px;
    }

    .currency-rate-container {
        padding: 20px 15px;
    }

    .rate-currency-code {
        font-size: 20px;
    }

    .rate-value {
        font-size: 48px;
    }

    .rate-change {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .rate-chart-container {
        height: 250px;
        padding: 10px;
    }

    .rate-tab {
        padding: 8px 15px;
        font-size: 13px;
    }
}
