/* ============================================================
   design-request.css — "Custom Design" popup (<dialog>) shared by the
   home page and the Print Order page. Markup: reva_dr_dialog() in
   inc/design-request.php; behaviour: js/design-request.js.
   ============================================================ */

html.dr-lock { overflow: hidden; }

/* Non-modal (show()) so the reCAPTCHA challenge can sit above it; centred
   and layered by hand. The backdrop div is added by design-request.js. */
.dr {
    position: fixed;
    inset: 0;
    z-index: 1001;
    width: min(640px, calc(100% - 32px));
    height: fit-content;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: #ffffff;
    color: #0e1b33;
    box-shadow: 0 40px 80px -20px rgba(14, 27, 51, 0.45);
    font-family: "Karla", sans-serif;
    overflow: auto;
}
.dr-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(14, 27, 51, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.dr-backdrop[hidden] { display: none; }
.dr__captcha { margin-bottom: 14px; }
.reva-recaptcha.is-invalid > div { outline: 2px solid #b42323; outline-offset: 2px; border-radius: 3px; }
.dr[open] { animation: dr-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes dr-in {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .dr[open] { animation: none; } }

.dr__card { position: relative; padding: clamp(24px, 4vw, 36px); }

.dr__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f3efe7;
    color: #0e1b33;
    cursor: pointer;
    transition: background 0.2s;
}
.dr__close:hover { background: #e9e3d6; }
.dr__close svg { width: 18px; height: 18px; }

.dr__eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fc575e;
}
.dr__title {
    margin: 0 0 6px;
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.dr__title em {
    font-style: italic;
    font-weight: 700;
    background: linear-gradient(135deg, #f7b42c, #fc575e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dr__intro { margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: #6b675c; }

.dr__form { display: flex; flex-direction: column; gap: 14px; }
.dr__form[hidden] { display: none; }
.dr__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dr__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.dr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dr-field > span { font-size: 13px; font-weight: 700; color: #0e1b33; }
.dr-field input,
.dr-field select,
.dr-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(14, 27, 51, 0.16);
    border-radius: 12px;
    background: #faf8f4;
    font: inherit;
    font-size: 15px;
    color: #0e1b33;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.dr-field textarea { resize: vertical; min-height: 96px; }
.dr-field input:focus,
.dr-field select:focus,
.dr-field textarea:focus {
    outline: none;
    border-color: #fc575e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(252, 87, 94, 0.15);
}
.dr-field.is-invalid input,
.dr-field.is-invalid select,
.dr-field.is-invalid textarea { border-color: #d93a3a; background: #fdf1f1; }

/* file picker styled as a dashed drop-zone button */
.dr-field--file { position: relative; }
.dr-field--file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dr-field--file b {
    display: block;
    padding: 12px 14px;
    border: 1.5px dashed rgba(14, 27, 51, 0.22);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b675c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dr-field--file:hover b { border-color: #fc575e; color: #0e1b33; }

.dr__error {
    padding: 10px 14px;
    border-radius: 12px;
    background: #fdf1f1;
    color: #b42323;
    font-size: 14px;
}
.dr__error[hidden] { display: none; }

.dr__submit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #f7b42c, #fc575e);
    color: #faf8f4;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.dr__submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(252, 87, 94, 0.3); }
.dr__submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.dr__submit--small { padding: 12px 26px; }
.dr__note { margin: -4px 0 0; font-size: 12px; color: #6b675c; }

.dr__done { text-align: center; padding: 12px 0 4px; }
.dr__done[hidden] { display: none; }
.dr__done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f7b42c, #fc575e);
    color: #fff;
}
.dr__done-icon svg { width: 28px; height: 28px; }
.dr__done h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.dr__done p { margin: 0 0 20px; color: #6b675c; line-height: 1.55; }
.dr__done .dr__submit { align-self: center; }

@media (max-width: 575.98px) {
    .dr__row { grid-template-columns: 1fr; }
    .dr { border-radius: 20px; }
}
