/* ==================================================================
   ETA request  --  the "Contact us for ETA" button that sits under the
   "Available to Order" badge on an out-of-stock product, and the modal
   it opens.

   Used by includes/eta.request.modal.cfm on the part page. Base font
   size here matches the site's body / input scale -- these fields are
   the same fields as the main enquiry form and should not read smaller
   just because they're in a modal.
   ================================================================== */

/* ---------- the trigger ---------- */

.eta-request-line {
    margin: 6px 0 0;
}

.eta-request-trigger {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #003366;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}

.eta-request-trigger:hover,
.eta-request-trigger:focus {
    text-decoration: none;
    color: #00509e;
}

/* The state a customer sees once they've asked. Deliberately not a
   button: there is nothing left to click, and an inert-looking button
   invites them to keep trying. */
.eta-request-done {
    margin: 6px 0 0;
    color: #003366;
    font-size: 16px;
    font-weight: bold;
}

.eta-request-done .eta-tick {
    color: #3C8500;
    margin-right: 4px;
    font-weight: bold;
}

.eta-request-done small {
    display: block;
    margin-top: 2px;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

/* ---------- the modal ---------- */

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

.eta-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px;
}

.eta-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.eta-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    margin: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 28px;
}

.eta-modal-panel h2 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #003366;
}

.eta-modal-intro {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

.eta-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
}

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

/* What they're asking about. Read-only on purpose -- it's context, not
   an input, and letting it be edited would decouple the ticket from the
   page it was raised on. */
.eta-modal-part {
    background: #F4F6F8;
    border-left: 3px solid #FFCB05;
    padding: 12px 14px;
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.5;
}

.eta-modal-part strong {
    font-size: 16px;
    color: #003366;
}

.eta-modal-part .eta-modal-vehicle {
    display: block;
    margin-top: 4px;
    color: #666;
}

.eta-modal .field {
    margin: 0 0 14px;
}

.eta-modal .field label {
    display: block;
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.eta-modal .field .req {
    color: #C0392B;
}

.eta-modal .field input[type="text"],
.eta-modal .field input[type="email"],
.eta-modal .field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-family: inherit;
    font-size: 18px;
    color: #333;
}

.eta-modal .field input:focus,
.eta-modal .field textarea:focus {
    border-color: #003366;
    outline: 2px solid rgba(0, 51, 102, 0.2);
}

.eta-modal .field-hint {
    margin: 4px 0 0;
    font-size: 14px;
    color: #777;
}

.eta-modal-row {
    display: flex;
    gap: 12px;
}

.eta-modal-row .field {
    flex: 1 1 50%;
    min-width: 0;
}

@media (max-width: 480px) {
    .eta-modal-panel { padding: 22px 18px; }
    .eta-modal-row   { display: block; }
}

.eta-modal-actions {
    margin-top: 20px;
}

.eta-modal-actions .button {
    width: 100%;
}

.eta-modal-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #FDECEA;
    border-left: 3px solid #C0392B;
    color: #922B21;
    font-size: 15px;
}

.eta-modal-error[hidden] {
    display: none;
}

.eta-modal-busy {
    opacity: 0.6;
    pointer-events: none;
}
