
.quote-popup-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quote-popup-modal.active { opacity: 1; visibility: visible; }
.quote-popup-overlay { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); cursor: pointer; }

.quote-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 60px);
    max-width: 1100px;
    height: 92vh;
    max-height: 92vh;
    background: #f5f6fa;
    border-radius: 10px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.quote-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6fa;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #333;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
}

.quote-popup-close:hover { background: #e8eaf0; border-color: #999; }

.quote-popup-body {
    width: 100%;
    height: 100%;
    flex: 1;
    padding: 35px 50px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f5f6fa;
    box-sizing: border-box;
}

.quote-popup-loading, .quote-popup-error { margin: 0; padding: 60px 20px; color: #666; text-align: center; }

.quote-popup-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #f5f6fa;
}

.quote-popup-frame--loading {
    width: 0;
    height: 0;
    min-height: 0;
    visibility: hidden;
}

#quotePopupBody .urgency-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 25px 0 !important;
    background: #f5f6fa !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

#quotePopupBody .urgency-side { display: none !important; }
#quotePopupBody .ec-base-table,
#quotePopupBody .ec-base-table.typeWrite,
#quotePopupBody .ec-base-table.typeWrite > table { width: 100% !important; max-width: none !important; box-sizing: border-box !important; }

#quotePopupBody .ec-base-table.typeWrite > table > tbody.urgency-fields > tr.urgency-field--full { grid-column: 1 / -1 !important; }

#quotePopupBody .ec-base-table select,
#quotePopupBody .ec-base-table input[type="text"],
#quotePopupBody .ec-base-table input[type="email"],
#quotePopupBody .ec-base-table input[type="tel"] { width: 100% !important; max-width: none !important; box-sizing: border-box !important; }

#quotePopupBody .ec-base-table textarea { display: block; width: 100% !important; max-width: none !important; min-height: 180px; box-sizing: border-box !important; resize: vertical; }
#quotePopupBody .ec-base-table textarea#privacy_agreement { display: block; width: 100% !important; max-width: none !important; min-height: 130px; box-sizing: border-box !important; resize: vertical; }
#quotePopupBody .file-attach { width: 100%; box-sizing: border-box; }
#quotePopupBody .ec-base-button, #quotePopupBody .ec-base-button .btnSubmitFix { width: 100% !important; max-width: none !important; }

#quotePopupBody .required {
    display: block !important;
    width: 100%;
    margin: 18px 0 20px !important;
    padding: 0;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-align: left !important;
    box-sizing: border-box;
}

#quotePopupBody .required-star { margin-right: 3px; color: #e53935; font-weight: 700; }

@media (max-width: 1023px) {
    .quote-popup-content { width: calc(100% - 40px); max-width: 900px; height: 92vh; max-height: 92vh; }
    .quote-popup-body { padding: 35px; }
    #quotePopupBody .urgency-container { width: 100% !important; max-width: none !important; }
}

@media (max-width: 767px) {
    .quote-popup-content { width: calc(100% - 20px); max-width: none; height: 95vh; max-height: 95vh; border-radius: 8px; }
    .quote-popup-body { padding: 55px 20px 30px; }
    .quote-popup-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 25px; }
    #quotePopupBody .urgency-container { width: 100% !important; max-width: none !important; padding: 0 !important; }
    #quotePopupBody .ec-base-table.typeWrite > table > tbody.urgency-fields { grid-template-columns: 1fr !important; }
    #quotePopupBody .ec-base-table textarea { min-height: 160px; }
    #quotePopupBody .ec-base-table textarea#privacy_agreement { min-height: 120px; }
}
