/**
 * SmartCheckout Enhanced - Unified Checkout V2 CSS
 * BEM-style classes for consistent styling
 */

/* Container */
.sce-unified-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Sections */
.sce-section {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sce-section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Products Section */
.sce-product-single {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sce-product-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.sce-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
}

/* Bundle Products */
.sce-products-bundle {
    margin-bottom: 15px;
}

.sce-bundle-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 6px;
}

.sce-bundle-type {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.sce-bundle-type:contains("🔒") { background: #e74c3c; }
.sce-bundle-type:contains("✅") { background: #27ae60; }
.sce-bundle-type:contains("⭕") { background: #8e44ad; }

.sce-products-list {
    display: grid;
    gap: 15px;
}

.sce-product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.sce-product-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.sce-hot-product {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fff7e6, #fef5e7);
}

.sce-hot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    color: white;
    background: #f39c12;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
    animation: pulse 2s infinite;
}

/* Badge Type Specific Styles */
.sce-hot-new {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.sce-hot-bestseller {
    background: linear-gradient(45deg, #FF5722, #E64A19);
}

.sce-hot-limited {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    animation: blink 1.5s infinite;
}

.sce-hot-save {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.sce-hot-popular {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

.sce-hot-hot {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

/* Badge Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Selection Controls */
.sce-product-selection {
    margin-right: 15px;
}

.sce-checkbox-label,
.sce-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.sce-product-checkbox,
.sce-product-radio {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #3498db;
}

.sce-auto-included {
    background: #27ae60;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* Customer Form */
.sce-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sce-field-full {
    grid-column: 1 / -1;
}

.sce-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.sce-required {
    color: #e74c3c;
}

.sce-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sce-form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sce-field-note {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Payment Methods */
.sce-payment-methods {
    display: grid;
    gap: 10px;
}

.sce-payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sce-payment-method:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.sce-payment-method input[type="radio"] {
    margin-right: 12px;
    accent-color: #3498db;
}

/* Shipping Summary */
.sce-section-shipping {
    border-color: #16a085;
}

.sce-shipping-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 15px;
}

.sce-shipping-toggle:hover {
    color: #16a085;
}

.sce-toggle-icon {
    transition: transform 0.3s ease;
}

.sce-expanded .sce-toggle-icon {
    transform: rotate(180deg);
}

.sce-shipping-content {
    margin-top: 15px;
}

.sce-shipping-products,
.sce-shipping-calculation,
.sce-total-breakdown {
    margin-bottom: 20px;
}

.sce-shipping-breakdown,
.sce-total-breakdown {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.sce-shipping-item,
.sce-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.sce-shipping-item:last-child,
.sce-total-item:last-child {
    border-bottom: none;
}

.sce-grand-total {
    background: #e8f5e8;
    border-radius: 6px;
    padding: 12px;
    border: 2px solid #27ae60;
    font-weight: 600;
}

.sce-selected-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    margin-bottom: 8px;
}

.sce-no-products {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}

/* Shipping Preview */
.sce-shipping-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #ecf0f1;
    border-radius: 6px;
    border-left: 4px solid #16a085;
}

.sce-preview-label {
    font-weight: 500;
    color: #2c3e50;
}

.sce-preview-cost {
    font-weight: 600;
    color: #16a085;
}

/* Submit Button */
.sce-submit-btn {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sce-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sce-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.sce-form-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 500;
}

.sce-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sce-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sce-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sce-form-grid {
        grid-template-columns: 1fr;
    }
    
    .sce-product-item {
        flex-direction: column;
        text-align: center;
    }
    
    .sce-product-selection {
        margin: 0 0 10px 0;
    }
}

/* Payment Method Notifications */
.sce-payment-notification {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    border-left: 4px solid;
    animation: slideInDown 0.3s ease-out;
}

.sce-notification-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.sce-notification-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

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

/* Payment method hide/show animation */
.payment-method {
    transition: all 0.3s ease-in-out;
}
