/**
 * 환율 페이지 스타일
 *
 * pages/currency.php 에서 사용하는 CSS 스타일입니다.
 * 환율 계산기 + 환율 테이블 레이아웃을 정의합니다.
 *
 * 접두사: cp- (currency-page)
 */

/* ==================== 페이지 헤더 ==================== */
.cp-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cp-header-flag {
    font-size: 2.5rem;
    line-height: 1;
}

.cp-header-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 2px;
}

.cp-badge-fallback {
    background: #fff3cd;
    color: #856404;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

/* ==================== 환율 계산기 ==================== */
.cp-calculator {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.cp-calculator-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cp-calculator-body {
    padding: 1rem;
}

.cp-calc-input,
.cp-calc-select {
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cp-calc-input:focus,
.cp-calc-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* 계산기 결과 영역 */
.cp-calc-result {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1px solid #d0ddf5;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cp-calc-result-label {
    color: #6c757d;
    font-size: 0.8rem;
}

.cp-calc-result-value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cp-calc-result-flag {
    font-size: 1.3rem;
}

.cp-calc-result-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a56db;
}

.cp-calc-result-code {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

/* ==================== 환율 테이블 ==================== */
.cp-rate-table {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.cp-rate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: background-color 0.15s;
}

.cp-rate-row:last-child {
    border-bottom: none;
}

.cp-rate-row:not(.cp-rate-header):hover {
    background-color: #f0f4ff;
}

.cp-rate-row:not(.cp-rate-header):active {
    background-color: #e0e9ff;
}

/* 테이블 헤더 */
.cp-rate-header {
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: default;
    border-bottom: 1px solid #e2e8f0;
}

/* 통화 정보 (왼쪽) */
.cp-rate-currency {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cp-rate-flag {
    font-size: 1.2rem;
}

.cp-rate-code {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
}

.cp-rate-name {
    color: #868e96;
    font-size: 0.8rem;
}

/* 환율 값 (오른쪽) */
.cp-rate-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
}

.cp-rate-header .cp-rate-value {
    font-weight: 600;
    font-size: 0.75rem;
    color: #6c757d;
}

/* ==================== 모바일 반응형 ==================== */
@media (max-width: 767.98px) {
    .cp-header-flag {
        font-size: 2rem;
    }

    .cp-calc-input,
    .cp-calc-select {
        font-size: 1rem !important;
    }

    .cp-calc-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .cp-calc-result-amount {
        font-size: 1.3rem;
    }

    .cp-rate-name {
        display: none;
    }

    .cp-rate-row {
        padding: 0.6rem 0.75rem;
    }
}
