/* --- Somar/subtrair dias de uma data / Add Days to a Date --- */

#operation {
    max-width: none;
}

.dd-start-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.dd-start-row input {
    flex: 1;
    min-width: 0;
}

.dd-start-row .code-button-secondary {
    white-space: nowrap;
    padding: 0 14px;
}

.dd-units {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dd-units .calc-field input {
    max-width: none;
}

.dd-presets-title {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 8px;
}

.dd-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.dd-preset {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--accent-soft);
    color: var(--accent-deep);
    border: none;
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.dd-preset:hover {
    background: var(--accent);
    color: #FFFFFF;
}

.dd-note {
    font-size: 0.85rem;
    color: var(--accent-deep);
    margin: 0 0 14px;
}

.dd-note:empty {
    display: none;
}

/* --- Resultado --- */

.dd-result-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
}

.dd-result-main > div > span {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-deep);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.dd-big-date {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--accent-deep);
}

.dd-formula {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-deep);
    margin: 6px 0 0;
    word-break: break-word;
}

.dd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dd-stats .result-item strong {
    font-size: 1.05rem;
    word-break: break-word;
}

.dd-stats small {
    font-size: 0.75rem;
    color: var(--muted);
}

.dd-stats small:empty {
    display: none;
}

/* --- Tabela de referência --- */

.dd-table th,
.dd-table td {
    font-size: 0.85rem;
}

.dd-table th[scope="row"] {
    color: var(--ink);
    font-weight: 500;
    text-transform: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.dd-table td {
    font-family: var(--font-mono);
    white-space: nowrap;
}

.dd-table-wrap {
    overflow-x: auto;
}

@media (max-width: 600px) {
    .dd-units {
        grid-template-columns: repeat(2, 1fr);
    }
    .dd-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dd-big-date {
        font-size: 1.25rem;
    }
    .dd-result-main {
        flex-direction: column;
    }
    .dd-table td {
        font-size: 0.78rem;
    }
}