/* WooCommerce Quote System Styles */

/* Quote Buttons */
.woo-quote-system-buttons {
    margin: 20px 0;
}

.add-to-quote-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 300px;
    font-weight: 600;
}

.add-to-quote-btn:hover {
    background-color: #005a87;
    color: white;
}

.add-to-quote-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.view-quote-list {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-quote-list:hover {
    border-bottom-color: #0073aa;
    text-decoration: none;
    color: #005a87;
}

/* Modal Styles */
.wqs-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.wqs-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wqs-modal-header {
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wqs-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.wqs-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.wqs-close:hover,
.wqs-close:focus {
    color: #000;
}

.wqs-modal-body {
    padding: 25px;
}

/* Quote Items */
.wqs-quote-items {
    margin-bottom: 20px;
}

.wqs-quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 12px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.wqs-quote-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wqs-item-details {
    flex: 1;
}

.wqs-item-details h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.wqs-quantity,
.wqs-price {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 2px;
}

.wqs-price {
    font-weight: 500;
    color: #0073aa;
}

.wqs-remove-item {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.wqs-remove-item:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Quote Actions */
.wqs-quote-actions {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

#clear-quote-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#clear-quote-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Customer Form */
.wqs-customer-form {
    display: none;
}

.wqs-customer-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.wqs-customer-form p {
    margin-bottom: 16px;
}

.wqs-customer-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.wqs-customer-form input[type="text"],
.wqs-customer-form input[type="email"],
.wqs-customer-form input[type="tel"],
.wqs-customer-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.wqs-customer-form input:focus,
.wqs-customer-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.wqs-customer-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.wqs-customer-form button {
    margin-right: 12px;
    margin-bottom: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wqs-customer-form .button-primary {
    background-color: #0073aa;
    color: white;
}

.wqs-customer-form .button-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.wqs-customer-form .button-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wqs-cancel-btn {
    background-color: #6c757d;
    color: white;
}

.wqs-cancel-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Messages */
.wqs-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 16px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    min-width: 250px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.wqs-success {
    background-color: #28a745;
    border-left: 4px solid #1e7e34;
}

.wqs-error {
    background-color: #dc3545;
    border-left: 4px solid #bd2130;
}

/* Empty State */
.wqs-empty-quote {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.wqs-empty-quote p {
    font-size: 16px;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wqs-modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .wqs-modal-body {
        padding: 20px 15px;
    }
    
    .wqs-modal-header {
        padding: 15px 20px;
    }
    
    .wqs-quote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    
    .wqs-remove-item {
        align-self: flex-end;
        margin-left: 0;
    }
    
    .add-to-quote-btn {
        width: 100%;
        max-width: none;
    }
    
    .wqs-customer-form button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .wqs-message {
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .wqs-modal-content {
        width: 98%;
        margin: 1% auto;
    }
    
    .wqs-modal-header h3 {
        font-size: 18px;
    }
    
    .wqs-close {
        font-size: 24px;
    }
}

/* Loading States */
.wqs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wqs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.wqs-modal:focus {
    outline: none;
}

.wqs-modal-content:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wqs-modal {
        display: none !important;
    }
}