/**
 * Product Inquiry Widget Styles
 */

/* Button Styles */
.product-inquiry-widget {
    display: inline-block;
}

.inquiry-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.inquiry-trigger-btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

.inquiry-trigger-btn--medium {
    padding: 12px 24px;
    font-size: 16px;
}

.inquiry-trigger-btn--large {
    padding: 16px 32px;
    font-size: 18px;
}

.inquiry-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inquiry-btn-text {
    display: inline-block;
}

/* Modal Overlay */
.inquiry-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inquiry-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Modal Content */
.inquiry-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.inquiry-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.inquiry-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.inquiry-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.inquiry-modal-close:hover {
    background-color: #f0f0f0;
}

.inquiry-close-icon {
    font-size: 24px;
    line-height: 1;
    color: #666;
    font-weight: 300;
}

/* Modal Body - Two Column Layout */
.inquiry-modal-body {
    display: flex;
    flex-direction: row;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Product Section (Left) */
.inquiry-product-section {
    flex: 0 0 40%;
    padding: 24px;
    border-right: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.inquiry-section-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.inquiry-product-card {
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.inquiry-product-image {
    margin-bottom: 12px;
}

.inquiry-product-image img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    display: block;
}

.inquiry-product-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inquiry-product-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.inquiry-product-sku,
.inquiry-product-price {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.inquiry-product-price {
    font-weight: 500;
}

.inquiry-label {
    font-weight: 500;
    color: #333;
    margin-right: 4px;
}

/* Form Section (Right) */
.inquiry-form-section {
    flex: 0 0 60%;
    padding: 24px;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inquiry-form-row {
    display: flex;
    gap: 16px;
}

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

.inquiry-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.inquiry-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.inquiry-form-group .required {
    color: #e74c3c;
    margin-left: 2px;
}

.inquiry-input,
.inquiry-textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background-color: #fff;
}

.inquiry-input:focus,
.inquiry-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.inquiry-textarea {
    resize: vertical;
    min-height: 80px;
}

.inquiry-form-actions {
    margin-top: 8px;
}

.inquiry-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.inquiry-submit-btn:hover {
    background-color: #005a87;
}

.inquiry-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Form Messages */
.inquiry-form-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.inquiry-form-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.inquiry-form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.inquiry-message-text {
    display: block;
    font-size: 14px;
}

.inquiry-hidden-fields {
    display: none;
}

/* Preview Mode (in Elementor Editor) */
.inquiry-modal-preview {
    position: relative;
    display: block !important;
    z-index: 1;
}

.inquiry-modal-preview .inquiry-modal-overlay {
    display: none;
}

.inquiry-modal-preview .inquiry-modal-content {
    position: relative;
    max-height: none;
}

/* Responsive */
@media (max-width: 768px) {
    .inquiry-modal-body {
        flex-direction: column;
    }

    .inquiry-product-section,
    .inquiry-form-section {
        flex: 1;
    }

    .inquiry-product-section {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .inquiry-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .inquiry-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .inquiry-modal-body {
        max-height: calc(95vh - 80px);
    }
}

/* Animation */
@keyframes inquiryModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes inquiryModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inquiry-modal.active {
    animation: inquiryModalFadeIn 0.3s ease;
}

.inquiry-modal.active .inquiry-modal-content {
    animation: inquiryModalSlideIn 0.3s ease;
}
