/* =========================================================
   CONVERSOR DE MOEDAS
   Estilos exclusivos da ferramenta
   ========================================================= */

.currency-tool {
    max-width: 960px;
    margin: 0 auto;
}

.currency-card {
    padding: 30px;
}

.currency-card h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.25rem;
}

.currency-description {
    margin: 0 0 26px;
    color: #64748b;
    line-height: 1.6;
}


/* =========================================================
   VALOR
   ========================================================= */

.currency-value-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}

.currency-value-area label {
    width: min(100%, 400px);
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
}

.currency-value-area input {
    width: min(100%, 400px);
    height: 52px;
    box-sizing: border-box;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 1.15rem;
    text-align: center;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.currency-value-area input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* =========================================================
   MOEDAS
   ========================================================= */

.currency-conversion-row {
    display: grid;
    grid-template-columns: 1fr 62px 1fr;
    gap: 14px;
    align-items: end;
    max-width: 820px;
    margin: 0 auto;
}

.currency-unit-field {
    display: flex;
    flex-direction: column;
}

.currency-unit-field label {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
}

.currency-unit-field select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.currency-unit-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.currency-swap-area {
    display: flex;
    justify-content: center;
}

.currency-swap-button {
    width: 56px;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 1.25rem;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.currency-swap-button:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}


/* =========================================================
   FAVORITOS
   ========================================================= */

.currency-favorites {
    margin-top: 24px;
}

.currency-favorites-title {
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
}

.favorite-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.favorite-button {
    padding: 8px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.favorite-button:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.favorite-button.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}


/* =========================================================
   BOTÕES
   ========================================================= */

.currency-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.currency-button {
    min-height: 44px;
    padding: 9px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.1s ease;
}

.currency-button:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.currency-button:active {
    transform: translateY(1px);
}

.currency-button-primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.currency-button-primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}


/* =========================================================
   STATUS DA API
   ========================================================= */

.currency-api-status {
    min-height: 22px;
    margin-top: 16px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}


/* =========================================================
   RESULTADO
   ========================================================= */

.currency-result {
    display: none;
    margin-top: 30px;
}

.currency-result.visible {
    display: block;
}

.currency-result-box {
    padding: 28px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
}

.currency-result-title {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.9rem;
}

.currency-result-value {
    color: #0f172a;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.currency-result-equation {
    margin-top: 12px;
    color: #475569;
    line-height: 1.5;
}

.currency-rate {
    margin-top: 18px;
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.6;
}

.currency-rate strong {
    color: #1e293b;
    font-size: 1rem;
}

.currency-date {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.78rem;
}

.currency-copy-status {
    min-height: 20px;
    margin-top: 10px;
    color: #2563eb;
    font-size: 0.8rem;
}


/* =========================================================
   SIMULADOR
   ========================================================= */

.currency-simulator {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid #e2e8f0;
}

.currency-simulator h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 1.05rem;
}

.currency-simulator-description {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.6;
}

.simulator-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.simulator-field {
    display: flex;
    flex-direction: column;
}

.simulator-field label {
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 600;
}

.simulator-field input {
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.simulator-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.simulator-result {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.simulator-result-label {
    color: #64748b;
    font-size: 0.8rem;
}

.simulator-result-value {
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 700;
}


/* =========================================================
   COMPARAÇÃO
   ========================================================= */

.currency-comparison {
    margin-top: 28px;
}

.currency-comparison h3 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 1.05rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    color: #1e293b;
    font-size: 0.86rem;
}

.comparison-table th,
.comparison-table td {
    padding: 11px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
}

.comparison-table tr:last-child td {
    border-bottom: 0;
}

.comparison-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}


/* =========================================================
   AVISO
   ========================================================= */

.currency-warning {
    margin-top: 24px;
    padding: 15px 17px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.6;
}

.currency-warning strong {
    color: #1e3a8a;
}


/* =========================================================
   INFORMAÇÕES
   ========================================================= */

.currency-info {
    max-width: 960px;
    margin: 0 auto;
}

.currency-info-card {
    padding: 30px;
}

.currency-info-card h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.2rem;
}

.currency-info-card h3 {
    margin-top: 25px;
    color: #0f172a;
    font-size: 1rem;
}

.currency-info-card p,
.currency-info-card li {
    color: #475569;
    line-height: 1.7;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 700px) {

    .currency-conversion-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .currency-swap-area {
        align-items: center;
    }

    .currency-swap-button {
        width: 100%;
    }

    .simulator-fields {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 480px) {

    .currency-card,
    .currency-info-card {
        padding: 20px;
    }

    .currency-actions {
        flex-direction: column;
    }

    .currency-button {
        width: 100%;
    }

    .currency-result-box {
        padding: 22px 16px;
    }

    .currency-result-value {
        font-size: 1.9rem;
    }

    .favorite-buttons {
        flex-direction: column;
    }

    .favorite-button {
        width: 100%;
    }

}


/* =========================================================
   IMPRESSÃO
   ========================================================= */

@media print {

    header,
    footer,
    .tool-breadcrumb,
    .tool-header,
    .ad-container,
    .currency-actions,
    .currency-simulator,
    .currency-warning {
        display: none !important;
    }

    .currency-result {
        display: block !important;
    }

    .currency-result-box {
        border: 1px solid #999;
        background: #fff;
    }

}