/* Interactive Price Calculator Styles */
.price-calculator-widget {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.3s ease;
    direction: ltr !important;
    text-align: left !important;
}

.price-calculator-widget:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.calculator-header {
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr !important;
    text-align: left !important;
}

.calculator-header h5 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-calculator {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.toggle-calculator:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.1);
}

.calculator-body {
    padding: 20px;
    direction: ltr !important;
    text-align: left !important;
}

.calculator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    direction: ltr !important;
    text-align: left !important;
}

.calculator-label {
    font-weight: 500;
    color: #2c3e50;
    margin: 0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ced4da;
    border-radius: 6px;
    overflow: hidden;
    direction: ltr !important;
}

.quantity-selector .qty-btn {
    border: none;
    border-radius: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.quantity-selector .qty-btn:hover {
    background: #B8860B;
    color: white;
}

.quantity-selector .qty-btn:active {
    transform: scale(0.95);
}

.quantity-input {
    border: none;
    border-left: 1px solid #ced4da;
    border-right: 1px solid #ced4da;
    border-radius: 0;
    width: 70px;
    text-align: center;
    font-weight: 600;
    height: 36px;
}

.quantity-input:focus {
    box-shadow: none;
    border-color: #B8860B;
}

.bulk-discount-info {
    margin-bottom: 15px;
}

.bulk-discount-info .alert {
    margin: 0;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-breakdown {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    direction: ltr !important;
    text-align: left !important;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    direction: ltr !important;
    text-align: left !important;
}

.breakdown-row.total-row {
    font-size: 16px;
    padding: 12px 0 8px 0;
}

.breakdown-row span:first-child {
    color: #6c757d;
}

.breakdown-row span:last-child {
    font-weight: 500;
}

.discount-row span:last-child {
    color: #28a745 !important;
}

.savings-display {
    margin: 15px 0;
}

.savings-display .alert {
    margin: 0;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #fff3cd, #fef7e0);
    border-color: #ffeaa7;
    color: #856404;
}

.quick-add-buttons {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
    direction: ltr !important;
    justify-content: flex-start;
}

.quick-add-buttons .btn {
    flex: 1;
    min-width: 50px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.quick-add-buttons .btn-outline-primary:hover {
    background: #B8860B;
    border-color: #B8860B;
    color: white;
    transform: translateY(-1px);
}

.quick-add-buttons .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.calculator-actions .btn {
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #B8860B 0%, #DAA520 100%);
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
    direction: ltr !important;
    text-align: center !important;
}

.calculator-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.4);
    background: linear-gradient(135deg, #A0750A 0%, #B8860B 100%);
}

.calculator-actions .btn:active {
    transform: translateY(0);
}

.calculator-actions .btn i {
    margin-right: 8px;
}

/* Animation effects */
.price-breakdown .breakdown-row {
    opacity: 0;
    animation: slideInUp 0.3s ease forwards;
}

.price-breakdown .breakdown-row:nth-child(1) { animation-delay: 0.1s; }
.price-breakdown .breakdown-row:nth-child(2) { animation-delay: 0.2s; }
.price-breakdown .breakdown-row:nth-child(3) { animation-delay: 0.3s; }
.price-breakdown .breakdown-row:nth-child(4) { animation-delay: 0.4s; }
.price-breakdown .breakdown-row:nth-child(5) { animation-delay: 0.5s; }

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

/* Pulse effect for total amount */
.total-row span:last-child {
    animation: pulse 2s infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .price-calculator-widget {
        margin: 15px 0;
    }
    
    .calculator-header {
        padding: 12px 15px;
    }
    
    .calculator-body {
        padding: 15px;
    }
    
    .calculator-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .quick-add-buttons {
        justify-content: center;
    }
    
    .breakdown-row {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .breakdown-row.total-row {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .calculator-header h5 {
        font-size: 16px;
    }
    
    .quantity-input {
        width: 60px;
    }
    
    .qty-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .quick-add-buttons .btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .price-calculator-widget {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .calculator-label {
        color: #ecf0f1;
    }
    
    .price-breakdown {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .breakdown-row span:first-child {
        color: #bdc3c7;
    }
    
    .quantity-selector {
        border-color: #34495e;
    }
    
    .quantity-input {
        background: #34495e;
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    .qty-btn {
        background: #34495e;
        color: #ecf0f1;
    }
}

/* Loading state */
.calculator-loading {
    opacity: 0.6;
    pointer-events: none;
}

.calculator-loading .calculator-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success/Error states */
.calculator-success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.calculator-error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}