/* Advanced Bulk Discount Calculator Styles */
#bdc-advanced-calculator {
    max-width: 1200px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.bdc-header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
}

.bdc-header h2 {
    margin: 0 0 10px;
    font-size: 2.5em;
    font-weight: 700;
}

.bdc-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Tabs */
.bdc-tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.bdc-tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.bdc-tab-btn:hover,
.bdc-tab-btn.active {
    background: rgba(255,255,255,0.2);
    border-bottom-color: #fff;
}

/* Tab Content */
.bdc-tab-content {
    display: none;
    padding: 30px;
    background: white;
    min-height: 400px;
}

.bdc-tab-content.active {
    display: block;
}

/* Form Styles */
.bdc-form {
    display: grid;
    gap: 20px;
}

.bdc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bdc-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bdc-form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.bdc-form-group input,
.bdc-form-group select {
    padding: 5px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.bdc-form-group input:focus,
.bdc-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Discount Tiers */
.bdc-discount-section {
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    background: #f8f9fa;
}

.bdc-discount-section h3 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.bdc-tier {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.bdc-tier input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.bdc-remove-tier {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.bdc-btn-primary,
.bdc-btn-secondary,
.bdc-btn-icon {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bdc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.bdc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.bdc-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e1e8ed;
}

.bdc-btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.bdc-btn-icon {
    background: transparent;
    border: 1px solid #ddd;
    color: #495057;
    padding: 8px 12px;
    font-size: 14px;
}

/* Results Section */
.bdc-results-section {
    background: white;
    margin: 20px;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
}

.bdc-results-section.show {
    display: block;
}

.bdc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.bdc-result-actions {
    display: flex;
    gap: 10px;
}

.bdc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bdc-result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.bdc-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.bdc-result-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bdc-result-card h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
}

.bdc-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.bdc-result-card.highlight .bdc-result-value {
    color: white;
}

/* Comparison Tool */
.bdc-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bdc-comparison-option {
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    background: #f8f9fa;
}

.bdc-comparison-option h4 {
    margin: 0 0 15px;
    text-align: center;
    color: #2c3e50;
}

.bdc-comparison-option input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Table Styles */
.bdc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bdc-table th,
.bdc-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.bdc-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.bdc-table tr:hover {
    background: #f8f9fa;
}

/* Presets */
.bdc-category-presets {
    margin: 20px 0;
}

.bdc-category-presets h3 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.bdc-preset {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    margin: 5px 10px 5px 0;
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bdc-preset:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
}

/* Chart Container */
.bdc-chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Recommendations */
.bdc-recommendations {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.bdc-recommendation-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #bdc-advanced-calculator {
        margin: 10px;
    }
    
    .bdc-form-row {
        grid-template-columns: 1fr;
    }
    
    .bdc-tabs {
        flex-direction: column;
    }
    
    .bdc-tier {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .bdc-results-grid {
        grid-template-columns: 1fr;
    }
    
    .bdc-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .bdc-results-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* Loading Animation */
.bdc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.bdc-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
}

.bdc-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bdc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animations */
.bdc-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bdc-slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
