.hmw-summary-card {
    max-width: 420px;
    border-radius: 20px;
    background: #f7eae4;
    padding: 12px 12px 8px;
    margin: 2rem auto;
    box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
}

.hmw-summary-head {
    text-align: center;
    color: #6c6c6c;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    cursor: pointer;
}

.hmw-summary-body {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 0 2px 10px;
}

/* Mobile collapsible functionality */
@media (max-width: 768px) {
    .hmw-summary-card {
        margin: 1rem auto;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .hmw-summary-head {
        transition: all 0.3s ease;
    }
    
    .hmw-summary-body {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: top;
        overflow: hidden;
        opacity: 1;
        transform: scaleY(1);
    }
    
    .hmw-summary-card.collapsed .hmw-summary-body,
    .hmw-summary-card.is-panel-collapsed .hmw-summary-body {
        max-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        opacity: 0;
        transform: scaleY(0);
    }
    
    .hmw-summary-toggle {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .hmw-summary-toggle:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .hmw-summary-toggle::after {
        content: '';
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid #6c6c6c;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .hmw-summary-card.collapsed .hmw-summary-toggle::after {
        transform: rotate(180deg);
        border-top-color: #e77f86;
    }
    
    /* Animación de entrada suave para las filas */
    .hmw-summary-row {
        transition: all 0.3s ease;
        transform: translateY(0);
        opacity: 1;
    }
    
    .hmw-summary-card.collapsed .hmw-summary-row {
        transform: translateY(-10px);
        opacity: 0;
    }
    
    /* Efecto hover en el header */
    .hmw-summary-head:hover {
        color: #e77f86;
        transform: translateY(-1px);
    }
    
    .hmw-summary-card.collapsed .hmw-summary-head:hover {
        transform: translateY(-1px) scale(1.02);
    }
    
    /* Estado de animación activa */
    .hmw-summary-card.animating {
        pointer-events: none;
    }
    
    .hmw-summary-card.animating .hmw-summary-toggle::after {
        animation: pulseArrow 0.5s ease-in-out;
    }
}

/* Animación de pulso para la flecha */
@keyframes pulseArrow {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Desktop: hide toggle button */
@media (min-width: 769px) {
    .hmw-summary-toggle {
        display: none !important;
    }
}

.hmw-summary-row {
    display: flex;
    gap: 10px;
    line-height: 1.5;
}
.hmw-summary-label {
    color: #e77f86;
    min-width: 160px;
    font-weight: 600;
}
.hmw-summary-value {
    color: #111;
    font-weight: 500;
}
.hmw-summary-actions {
    margin-top: 20px;
    text-align: center;
}
.hmw-summary-btn {
    display: inline-block;
    background: #f49898;
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
}
.hmw-summary-btn:hover {
    filter: brightness(.96);
}

.hmw-summary-btn:focus-visible,
.hmw-summary-toggle:focus-visible {
    outline: 2px solid #f49898;
    outline-offset: 3px;
}

.hmw-summary.error,
.hmw-summary.empty {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: #f7eae4;
    color: #6c6c6c;
    text-align: center;
}

.hmw-summary.error {
    color: #773232;
    border: 1px solid #f49898;
}

@media (max-width: 768px) {
    .hmw-summary-row {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 10px;
    }

    .hmw-summary-label {
        min-width: 0;
    }

    .hmw-summary-card.collapsed .hmw-summary-head::after {
        content: none;
    }
}
