/**
 * OLS Bundle Builder - Modern Design
 * Clean, professional, and responsive bundle builder interface
 */

.ols-bb {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    color: #1a1a1a;
    line-height: 1.6;
}



.ols-bb-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
}

.ols-bb-subtitle {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

/* Section Titles */
.ols-bb-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

/* Date Selection */
.ols-bb-dates-section {
    margin-bottom: 40px;
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.ols-bb-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ols-bb-date-field {
    display: flex;
    flex-direction: column;
}

.ols-bb-date-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ols-bb-date-field input[type="date"] {
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ols-bb-date-field input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Main Content Layout */
.ols-bb-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Products Section */
.ols-bb-products-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.ols-bb-products {
    display: grid;
    gap: 24px;
}

.ols-bb-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ols-bb-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ols-bb-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Product Cards */
.ols-bb-product-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.ols-bb-product-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.ols-bb-product-card.selected {
    border-color: #667eea;
    background: #f8faff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.ols-bb-product-inner {
    padding: 0;
}

.ols-bb-product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.ols-bb-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ols-bb-product-card:hover .ols-bb-product-image img {
    transform: scale(1.05);
}

.ols-bb-product-image a {
    display: block;
    text-decoration: none;
}

.ols-bb-product-content {
    padding: 24px;
}

.ols-bb-product-title {
    margin: 0 0 12px 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.ols-bb-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ols-bb-product-title a:hover {
    color: #667eea;
}

.ols-bb-product-price {
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

.ols-bb-product-price .woocommerce-Price-amount {
    color: inherit;
}

/* Product Controls */
.ols-bb-product-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ols-bb-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.875rem;
}

.ols-bb-checkbox-label:hover {
    background: #f3f4f6;
    border-color: #667eea;
}

.ols-bb-checkbox-label:has(input:checked) {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.ols-bb-product-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.ols-bb-checkbox-text {
    font-weight: 600;
    color: inherit;
}

.ols-bb-quick-add-btn {
    padding: 12px 20px;
    background: #059669;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ols-bb-quick-add-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.ols-bb-quick-add-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3);
}

/* Summary Section */
.ols-bb-summary-section {
    position: sticky;
    top: 20px;
}

.ols-bb-summary-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.ols-bb-summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.ols-bb-summary-content {
    margin-bottom: 24px;
}

.ols-bb-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.ols-bb-summary-label {
    color: #6b7280;
    font-weight: 500;
}

.ols-bb-summary-value {
    font-weight: 600;
    color: #1a1a1a;
}

.ols-bb-discount-line .ols-bb-summary-label {
    color: #059669;
}

.ols-bb-discount-line .ols-bb-summary-value {
    color: #059669;
}

.ols-bb-total-line {
    font-size: 1.125rem;
    margin-top: 8px;
}

.ols-bb-total-label {
    font-weight: 700;
    color: #1a1a1a;
}

.ols-bb-total-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.25rem;
}

.ols-bb-summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

/* Discount Info */
.ols-bb-discount-info {
    margin-bottom: 24px;
}

.ols-bb-discount-message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.ols-bb-discount-eligible {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ols-bb-discount-not-eligible {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.ols-bb-discount-icon {
    margin-right: 8px;
    font-weight: 700;
}

/* Summary Actions */
.ols-bb-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ols-bb-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ols-bb-btn-primary {
    background: #667eea;
    color: #ffffff;
}

.ols-bb-btn-primary:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ols-bb-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.ols-bb-btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.ols-bb-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.ols-bb-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Messages */
.ols-bb-messages {
    margin-top: 24px;
}

.ols-bb-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    border-left: 4px solid;
}

.ols-bb-message-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #059669;
}

.ols-bb-message-error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #dc2626;
}

.ols-bb-message-info {
    background: #dbeafe;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ols-bb-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .ols-bb-summary-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .ols-bb {
        padding: 0 16px;
    }
    
    .ols-bb-header {
        padding: 32px 24px;
        margin-bottom: 32px;
    }
    
    .ols-bb-main-title {
        font-size: 2rem;
    }
    
    .ols-bb-dates-section,
    .ols-bb-products-section,
    .ols-bb-summary-card {
        padding: 24px;
    }
    
    .ols-bb-dates {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ols-bb-grid-2,
    .ols-bb-grid-3,
    .ols-bb-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .ols-bb-product-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ols-bb-header {
        padding: 24px 20px;
    }
    
    .ols-bb-main-title {
        font-size: 1.75rem;
    }
    
    .ols-bb-subtitle {
        font-size: 1rem;
    }
    
    .ols-bb-dates-section,
    .ols-bb-products-section,
    .ols-bb-summary-card {
        padding: 20px;
    }
    
    .ols-bb-btn {
        padding: 14px 20px;
        font-size: 0.875rem;
    }
}

/* Accessibility Improvements */
.ols-bb-product-checkbox:focus,
.ols-bb-quick-add-btn:focus,
.ols-bb-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ols-bb-product-card {
        border-width: 3px;
    }
    
    .ols-bb-product-card:hover,
    .ols-bb-product-card.selected {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ols-bb-product-card,
    .ols-bb-product-image img,
    .ols-bb-checkbox-label,
    .ols-bb-quick-add-btn,
    .ols-bb-btn {
        transition: none;
    }
    
    .ols-bb-product-card:hover {
        transform: none;
    }
    
    .ols-bb-product-card:hover .ols-bb-product-image img {
        transform: none;
    }
    
    .ols-bb-quick-add-btn:hover,
    .ols-bb-btn:hover {
        transform: none;
    }
}