/**
 * Asseteon Quote Request Styles
 */

/* Quote Button */
.asseteon-quote-button-wrapper {
    margin: 15px 0;
}

.asseteon-quote-button {
    display: inline-block;
    background: #2c3e50 !important;
    color: #ffffff !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asseteon-quote-button:hover {
    background: #1a252f !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Quote Form Wrapper */
.asseteon-quote-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Product Info Header */
.asseteon-product-info {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.asseteon-product-info h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.asseteon-product-info .product-sku {
    margin: 0;
    opacity: 0.8;
    font-size: 14px;
}

/* Form Styling */
.asseteon-quote-form {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

/* Form Row (two columns) */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #ffffff;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Checkbox Styling */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #555;
}

.checkbox-label a {
    color: #3498db;
    text-decoration: underline;
}

/* Shipping Section */
.shipping-section {
    background: #f8f9fa;
    margin: 0 -30px;
    padding: 25px 30px !important;
    border-radius: 0;
}

.shipping-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

/* Submit Button */
.form-submit {
    margin-top: 25px;
}

.asseteon-submit-button {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: #ffffff !important;
    padding: 15px 40px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.asseteon-submit-button:hover {
    background: linear-gradient(135deg, #219a52 0%, #27ae60 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.asseteon-submit-button:disabled {
    background: #95a5a6 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.form-messages {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    display: none;
}

.form-messages.success {
    display: block;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-messages.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Loading State */
.asseteon-quote-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Integration with Lead Extraction - Quick Fill */
.quick-fill-notice {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.quick-fill-notice a {
    color: #004085;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .asseteon-quote-form-wrapper {
        padding: 10px;
    }
    
    .asseteon-quote-form {
        padding: 20px;
    }
    
    .shipping-section {
        margin: 0 -20px;
        padding: 20px !important;
    }
    
    .asseteon-product-info {
        padding: 20px;
    }
    
    .asseteon-product-info h3 {
        font-size: 20px;
    }
}

/* Request Quote popup */
body.asseteon-modal-open { overflow: hidden; }

.asseteon-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.asseteon-modal-box {
    position: relative;
    width: 100%;
    max-width: 880px;
    height: 90vh;
    max-height: 900px;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.asseteon-modal-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.asseteon-modal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 16px;
}

.asseteon-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.55) !important;
    color: #ffffff !important;
    font-size: 24px;
    line-height: 36px;
    padding: 0 !important;
    cursor: pointer;
}

.asseteon-modal-close:hover { background: rgba(0, 0, 0, 0.8) !important; }

@media (max-width: 600px) {
    .asseteon-modal-overlay { padding: 0; }
    .asseteon-modal-box { height: 100vh; max-height: none; border-radius: 0; }
}


/* Privacy checkbox: keep it visible and clickable even when the theme restyles
   or hides native checkboxes (common in WooCommerce themes). */
.checkbox-group .checkbox-label {
    position: relative;
    z-index: 5;
    pointer-events: auto !important;
}
.checkbox-group .checkbox-label input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: auto !important;
    display: inline-block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    clip: auto !important;
    clip-path: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    margin: 2px 0 0 0 !important;
    flex: 0 0 20px;
    z-index: 5;
    cursor: pointer;
}
.checkbox-group .checkbox-label::before,
.checkbox-group .checkbox-label::after,
.checkbox-group .checkbox-label input[type="checkbox"]::before,
.checkbox-group .checkbox-label input[type="checkbox"]::after {
    display: none !important;
    content: none !important;
}
.checkbox-group .checkbox-label span {
    pointer-events: auto;
}
