/* Wrap the form in a full-width table row */
#ctq-quote-wrap {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 0 8px;
    font-size: 14px;
}

#ctq-quote-wrap h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

#ctq-quote-wrap .ctq-no-shipping-msg {
    margin: 0 0 16px;
    padding: 0;
    color: #333;
    line-height: 1.5;
}

#ctq-form .ctq-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

#ctq-form .ctq-field {
    flex: 1;
    margin-bottom: 12px;
}

#ctq-form .ctq-row .ctq-field {
    margin-bottom: 0;
}

#ctq-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #333;
}

#ctq-form label .required {
    color: #e2401c;
    margin-left: 2px;
}

#ctq-form input[type="text"],
#ctq-form input[type="email"],
#ctq-form input[type="tel"],
#ctq-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

#ctq-form input:focus,
#ctq-form textarea:focus {
    border-color: #447FC1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(68,127,193,0.15);
}

#ctq-form textarea {
    resize: vertical;
    min-height: 80px;
}

#ctq-submit-btn {
    background: #447FC1 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    margin-top: 4px;
    width: 100%;
}

#ctq-submit-btn:hover:not(:disabled) {
    background: #3569a8 !important;
}

#ctq-submit-btn:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

#ctq-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 14px;
    display: none;
}

#ctq-message.ctq-success {
    display: block;
    background: #ecf7ed;
    border: 1px solid #8bc98e;
    color: #2a6b2d;
}

#ctq-message.ctq-error {
    display: block;
    background: #fdf2f2;
    border: 1px solid #e8b4b4;
    color: #8b2020;
}

#ctq-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
}

#ctq-form select:focus {
    border-color: #447FC1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(68,127,193,0.15);
}

#ctq-quote-wrap {
    text-align: left;
}

#ctq-open-modal-btn {
    margin-bottom: 20px;
    background: #447FC1 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    width: 100%;
}

#ctq-open-modal-btn:hover {
    background: #3569a8 !important;
}

/* Blur what's behind the modal via the overlay itself, not the page elements,
   since filtering page elements breaks fixed/sticky positioned headers. */
body.ctq-modal-open {
    overflow: hidden;
}

.ctq-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}

.ctq-modal-overlay[hidden] {
    display: none;
}

.ctq-modal {
    position: relative;
    background: #fff;
    border-radius: 6px;
    padding: 28px 28px 24px;
    max-width: 620px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    text-align: left;
}

.ctq-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    padding-right: 24px;
}

.ctq-modal-intro {
    margin: 0 0 20px;
    color: #333;
    line-height: 1.5;
}

.ctq-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
}

.ctq-modal-close:hover {
    color: #000;
}
