/* calc/assets/css/calculators/currency-converter.css */

:root {
    --cur-primary: #059669; /* Зеленый */
    --cur-bg: #ECFDF5;      /* Светло-зеленый */
    --cur-dark: #064E3B;
}

/* --- ВЕРХНЯЯ ЧАСТЬ --- */
.calc-header { margin-bottom: 40px; }
.subtitle { color: var(--text-secondary); margin-top: 12px; font-size: 16px; line-height: 1.5; }

.calc-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 992px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; gap: 48px; } }

/* Конвертер */
.currency-row {
    display: flex; gap: 16px;
    background: #F9FAFB; padding: 20px;
    border-radius: 20px; border: 1px solid #E5E7EB;
}
.cr-input-group { flex-grow: 1; }
.cr-input-group label {
    font-size: 13px; font-weight: 600; color: #6B7280; margin-bottom: 8px; display: block;
}

.currency-input {
    width: 100%; border: none; background: transparent; font-size: 32px;
    font-weight: 800; color: #111827; outline: none; padding: 0;
    -moz-appearance: textfield;
}
.currency-input::-webkit-outer-spin-button,
.currency-input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}

/* Кнопка смены */
.swap-button-wrapper {
    display: flex; justify-content: center;
    margin: -22px 0; z-index: 10; position: relative;
}
.swap-button {
    width: 44px; height: 44px; border-radius: 50%; border: 4px solid #fff;
    background: var(--cur-primary); color: #fff; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}
.swap-button:hover { transform: scale(1.1) rotate(180deg); }
.swap-button:active { transform: scale(1); }

/* --- KILLER FEATURE: Кастомный селект --- */
.custom-select-wrapper { width: 150px; flex-shrink: 0; position: relative; }
.custom-select-wrapper label { font-size: 13px; font-weight: 600; color: #6B7280; margin-bottom: 8px; display: block; }
.custom-select-trigger {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 10px; border: 1px solid #E5E7EB; border-radius: 10px;
    background: #fff; cursor: pointer; transition: all 0.2s;
}
.custom-select-trigger:hover { border-color: #D1D5DB; }
.custom-select-wrapper.open .custom-select-trigger { border-color: var(--cur-primary); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1); }
.custom-select-trigger .flag { font-size: 20px; line-height: 1; }
.custom-select-trigger .code { font-size: 16px; font-weight: 700; flex-grow: 1; }
.custom-select-trigger .ri-arrow-down-s-line { color: #9CA3AF; transition: transform 0.2s; }
.custom-select-wrapper.open .ri-arrow-down-s-line { transform: rotate(180deg); }

.custom-select-options {
    position: absolute; top: 100%; right: 0; width: 300px;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
    box-shadow: var(--shadow-float); z-index: 100;
    margin-top: 8px; padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.2s;
}
.custom-select-wrapper.open .custom-select-options { opacity: 1; visibility: visible; transform: translateY(0); }

.option-search {
    width: 100%; padding: 10px; border: 1px solid #E5E7EB; border-radius: 8px;
    margin-bottom: 8px; outline: none;
}
.options-list { max-height: 250px; overflow-y: auto; }
.option-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: 8px; cursor: pointer;
}
.option-item:hover, .option-item.selected { background: var(--cur-bg); }
.option-item .name { font-size: 14px; font-weight: 600; color: #374151; }
.option-item .sub { font-size: 12px; color: #9CA3AF; }

/* Слайдер */
.quick-sum-slider { margin-top: 20px; }
.quick-sum-slider input[type=range] { width: 100%; cursor: pointer; }
.qs-labels { display: flex; justify-content: space-between; font-size: 12px; color: #9CA3AF; font-weight: 600; margin-top: 4px; }

.rate-info {
    text-align: center; margin-top: 24px; font-size: 13px; font-weight: 600; color: #9CA3AF;
}

/* --- ПРАВАЯ ЧАСТЬ: РЕЗУЛЬТАТ --- */
.currency-result-card { background: #fff; border: 2px solid var(--cur-bg); padding: 24px; }
@media (min-width: 992px) { .sticky-card { position: sticky; top: 24px; } }

.result-header { text-align: center; margin-bottom: 24px; }
.result-header h2 { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin: 0; }

.quick-rates { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.qr-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #F9FAFB; border-radius: 12px; }
.qr-label { font-weight: 600; color: #4B5563; }
.qr-val { font-weight: 800; font-size: 18px; color: var(--cur-dark); }
.disclaimer { font-size: 12px; color: #9CA3AF; line-height: 1.5; text-align: center; }

/* --- НИЖНЯЯ ЧАСТЬ --- */
.info-wrapper { padding: 80px 0; margin-top: 60px; border-top: 1px solid #E5E7EB; }

.author-badge { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 40px; padding: 20px; background: #F8FAFC; border-radius: 16px; border: 1px solid #E2E8F0; }
.author-avatar { width: 48px; height: 48px; background: var(--cur-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.author-info { display: flex; flex-direction: column; min-width: 0; }
.author-name { font-size: 15px; font-weight: 700; color: #1F2937; line-height: 1.4; margin-bottom: 4px; }
.author-date { font-size: 13px; color: #6B7280; }

.icon-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 32px; font-size: 26px; font-weight: 800; color: #1F2937; line-height: 1.25; letter-spacing: -0.02em; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.06); flex-shrink: 0; margin-top: -6px; font-size: 26px; }

.green-icon { color: var(--cur-primary); }
.dark-icon { color: #1F2937; }

.calc-description p { font-size: 17px; line-height: 1.7; color: #4B5563; margin-bottom: 24px; }
.calc-description strong { color: #1F2937; font-weight: 700; }

.seo-table-wrapper { overflow-x: auto; margin: 32px 0; background: #fff; border-radius: 16px; border: 1px solid #E5E7EB; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.seo-table { width: 100%; border-collapse: collapse; min-width: 500px; text-align: left; }
.seo-table th { background: #F9FAFB; padding: 16px 20px; font-size: 13px; font-weight: 700; color: #6B7280; text-transform: uppercase; border-bottom: 1px solid #E5E7EB; }
.seo-table td { padding: 16px 20px; font-size: 15px; border-bottom: 1px solid #F3F4F6; }
.seo-table tr:last-child td { border-bottom: none; }
.text-danger { color: #DC2626; }
.text-success { color: #16A34A; }

@media (max-width: 480px) {
    .currency-row { flex-direction: column; padding: 16px; }
    .custom-select-wrapper { width: 100%; }
    .swap-button-wrapper { margin: -28px 0; }
    .currency-input { font-size: 28px; }
    .author-badge { flex-direction: column; text-align: center; align-items: center; }
}