/* ================================================================
   RESUMEN DE LA DONACIÓN
   Variables compartidas: variables.css
   ================================================================ */

/* ================================================================
   01. CABECERA Y ACCIÓN DE EDICIÓN
   ================================================================ */
.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-right: 6px;
}

.summary-header h3 {
    flex: 1;
    margin: 0;
}

.summary-edit {
    flex: 0 0 auto;
    margin-left: 14px;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-decoration: underline;
}

/* ================================================================
   02. BLOQUES DEL RESUMEN
   ================================================================ */
.summary-block {
    margin: 30px 0 16px;
    padding: 15px;
    overflow: hidden;
    background: var(--color-summary-bg);
}

.summary-block:last-child {
    margin-bottom: 0;
}

.summary-block ul li > span:first-child {
    color: var(--color-text-main);
    font-weight: 600;
}

/* ================================================================
   03. RESPONSIVE
   ================================================================ */
@media (min-width: 554px) and (max-width: 850px) {
    #donationWizard .wizard-slide[data-step="4"] .summary-list li {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px 12px;
        max-width: 100%;
    }

    #donationWizard .wizard-slide[data-step="4"] .summary-list li span:last-child {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        text-align: right;
    }
}

@media (max-width: 768px) {
    .summary-block {
        display: flex;
        flex-direction: column;
    }

    /* Permite situar el botón Editar al final del bloque en móvil */
    .summary-header {
        display: contents;
    }

    .summary-block > * {
        order: 1;
    }

    .summary-block h3 {
        order: 0;
        margin-bottom: 10px;
    }

    .summary-block .summary-edit {
        order: 2;
        align-self: flex-start;
        margin: 14px 0 0;
    }
}
