.attppf-instant-subtotal {
    margin: 15px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #28a745;
    border-radius: 8px;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
}

.attppf-instant-subtotal.no-selections {
    border-color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.15);
}

.attppf-subtotal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.attppf-subtotal-header span:first-child {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.attppf-subtotal-toggle {
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
}

.attppf-subtotal-details {
    margin-bottom: 8px;
    display: none;
}

.attppf-selection-breakdown {
    font-size: 12px;
    color: #6c757d;
}

.attppf-subtotal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.attppf-subtotal-total span:first-child {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.attppf-subtotal-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 18px;
}

.attppf-subtotal-loading {
    display: none;
    text-align: center;
    padding: 8px;
    color: #6c757d;
    font-size: 12px;
}

.attppf-subtotal-loading .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* Spin animation - respect user motion preferences */
@media (prefers-reduced-motion: no-preference) {
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* Fallback for reduced motion - simple opacity change */
@media (prefers-reduced-motion: reduce) {
    .attppf-subtotal-loading .spinner {
        animation: none;
        opacity: 0.7;
    }
}
