/**
 * DS WooCommerce Smart Quotes - Modal Styles (WordPress Compatible)
 * 
 * @package Dsantos\WooSmartQuotes
 * @since 1.3.1
 */

/* Modal Base */
.wsq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.wsq-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.wsq-modal-content {
    position: relative;
    background: #fff;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal Header */
.wsq-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.wsq-modal-title {
    margin: 0;
    font-size: 1.5em;
    color: #333;
}

.wsq-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsq-modal-close:hover {
    color: #333;
}

/* Modal Body */
.wsq-modal-body {
    padding: 20px;
}

.wsq-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.wsq-modal-footer .button {
    margin-left: 10px;
}

/* Product Info */
.wsq-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wsq-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.wsq-product-name {
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.wsq-product-price {
    color: #666;
    font-size: 0.9em;
}

/* Form Compatibility - Use WordPress/WooCommerce classes */
.wsq-form .form-row {
    margin-bottom: 15px;
}

.wsq-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wsq-form .required {
    color: #e74c3c;
}

.wsq-phone-group {
    display: flex;
    gap: 10px;
}

.wsq-country-select {
    flex: 0 0 140px;
}

.wsq-phone-input {
    flex: 1;
}

.wsq-company-field {
    display: none;
}

.wsq-company-field.show {
    display: block;
}

/* Honeypot */
.wsq-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Multi-Quote Modal */
.wsq-mq-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wsq-mq-modal {
    background: #fff;
    border-radius: 4px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.wsq-mq-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsq-mq-close:hover {
    color: #333;
}

.wsq-modal-title {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    color: #333;
}

.wsq-products-count {
    margin: 0 0 15px 0;
    font-weight: 600;
    color: #333;
}

.wsq-products-list {
    margin-bottom: 20px;
}

.wsq-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.wsq-product-item:last-child {
    margin-bottom: 0;
}

.wsq-product-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.wsq-product-item h4 {
    margin: 0 0 5px 0;
    font-size: 1em;
    color: #333;
}

.wsq-product-qty {
    color: #666;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .wsq-modal-content,
    .wsq-mq-modal {
        margin: 20px;
        max-width: none;
        width: auto;
    }
    
    .wsq-phone-group {
        flex-direction: column;
    }
    
    .wsq-country-select {
        flex: none;
    }
    
    .wsq-product-info,
    .wsq-product-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .wsq-modal-footer {
        text-align: center;
    }
    
    .wsq-modal-footer .button {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}