/* BSM Single Delivery Day Cart - Frontend Styles */

/* Cart Delivery Day Summary */
.bsm-cart-delivery-summary {
    background: linear-gradient(135deg, #E63946 0%, #F78DA7 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bsm-cart-delivery-summary h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsm-cart-delivery-summary .delivery-icon {
    font-size: 1.4em;
}

.bsm-delivery-date {
    font-size: 1.1em;
    font-weight: 500;
    margin: 8px 0;
}

.bsm-delivery-items-count {
    opacity: 0.9;
    font-size: 0.95em;
}

/* Product Page Delivery Info */
.bsm-product-delivery-info {
    background: #FFF8F0;
    border: 2px solid #FFDAC1;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
    position: relative;
}

.bsm-product-delivery-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E63946, #F78DA7);
    border-radius: 8px 8px 0 0;
}

.bsm-product-delivery-info h4 {
    margin: 0 0 12px 0;
    color: #2D2D2D;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bsm-delivery-day-display {
    font-size: 1.05em;
    color: #E63946;
    font-weight: 600;
    margin: 8px 0;
}

.bsm-estimated-date {
    color: #8D6E63;
    font-size: 0.95em;
    font-style: italic;
}

/* Compatibility Warnings */
.bsm-compatibility-warning {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: #2D2D2D;
    border: 1px solid #D4AF37;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
    animation: slideInWarning 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.bsm-compatibility-warning h4 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.bsm-compatibility-warning .warning-icon {
    font-size: 1.2em;
}

.bsm-compatibility-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Error Messages */
.bsm-error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
    animation: slideInError 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.bsm-error-message h4 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.bsm-error-message .error-icon {
    font-size: 1.2em;
}

/* Success Messages */
.bsm-success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    padding: 16px;
    margin: 15px 0;
    animation: slideInSuccess 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.bsm-success-message h4 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.bsm-success-message .success-icon {
    font-size: 1.2em;
}

/* Buttons */
.bsm-action-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.bsm-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.bsm-action-button:active {
    transform: translateY(0);
}

.bsm-action-button.secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.bsm-action-button.secondary:hover {
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.3);
}

.bsm-action-button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.bsm-action-button.danger:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.bsm-action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bsm-action-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

/* Loading States */
.bsm-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.bsm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #FFDAC1;
    border-top-color: #E63946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.bsm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #FFDAC1;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Admin Statistics */
.bsm-admin-stats {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.bsm-admin-stats h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bsm-stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}

.bsm-stat-card h4 {
    margin: 0 0 8px 0;
    color: #64748b;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bsm-stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bsm-stat-change {
    font-size: 0.85em;
    margin-top: 8px;
    font-weight: 500;
}

.bsm-stat-change.positive {
    color: #10b981;
}

.bsm-stat-change.negative {
    color: #ef4444;
}

.bsm-stat-change.neutral {
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bsm-cart-delivery-summary {
        padding: 16px;
        margin: 16px 0;
    }
    
    .bsm-cart-delivery-summary h3 {
        font-size: 1.1em;
    }
    
    .bsm-product-delivery-info {
        padding: 12px;
        margin: 12px 0;
    }
    
    .bsm-compatibility-warning,
    .bsm-error-message,
    .bsm-success-message {
        padding: 12px;
        margin: 12px 0;
    }
    
    .bsm-compatibility-actions {
        flex-direction: column;
    }
    
    .bsm-action-button {
        padding: 12px 16px;
        justify-content: center;
    }
    
    .bsm-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .bsm-stat-card {
        padding: 12px;
    }
    
    .bsm-stat-value {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .bsm-cart-delivery-summary {
        padding: 12px;
        margin: 12px 0;
    }
    
    .bsm-cart-delivery-summary h3 {
        font-size: 1em;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    
    .bsm-delivery-date {
        font-size: 1em;
        text-align: center;
    }
    
    .bsm-product-delivery-info {
        padding: 10px;
    }
    
    .bsm-product-delivery-info h4 {
        font-size: 1em;
    }
}

/* Animations */
@keyframes slideInWarning {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInSuccess {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Focus States for Accessibility */
.bsm-action-button:focus {
    outline: 2px solid #E63946;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bsm-cart-delivery-summary,
    .bsm-product-delivery-info,
    .bsm-compatibility-warning,
    .bsm-error-message,
    .bsm-success-message {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .bsm-action-button,
    .bsm-compatibility-warning,
    .bsm-error-message,
    .bsm-success-message {
        animation: none;
        transition: none;
    }
    
    .bsm-action-button:hover {
        transform: none;
    }
    
    .bsm-loading::after,
    .bsm-spinner {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .bsm-compatibility-actions,
    .bsm-action-button {
        display: none;
    }
    
    .bsm-cart-delivery-summary,
    .bsm-product-delivery-info {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}