/*! Ditat Theme v1.2.0 — assets/css/contact-modal.css
 * (c) Ditat — https://ditat.com — All rights reserved */

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.contact-modal::backdrop {
    background: rgb(var(--shadow-base) / 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.contact-modal-inner {
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.contact-modal-inner:has(.contact-form.is-done) {
    align-items: center;
}

.contact-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: var(--white);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 30px 80px -20px rgb(var(--shadow-base) / 0.35);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity .25s ease, transform .3s cubic-bezier(.32, .72, 0, 1);
}

.contact-modal[open] .contact-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.contact-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 50%;
    transition: background .15s ease, color .15s ease;
}

.contact-modal-close svg {
    width: 18px;
    height: 18px;
    display: block;
}

.contact-modal-close:hover {
    background: var(--soft);
    color: var(--navy);
}

.contact-modal-title {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0 0 28px;
}

.contact-modal-sub {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: .9375rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form.is-done .contact-fields {
    display: none;
}

.contact-row,
.contact-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.contact-label {
    font-weight: 600;
    font-size: .875rem;
    color: var(--navy);
    letter-spacing: -0.005em;
}

.contact-req {
    color: var(--cta);
    margin-left: 2px;
}

.contact-help {
    font-size: .75rem;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 400;
}

.contact-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .875rem;
    color: var(--navy);
    cursor: pointer;
    line-height: 1.45;
}

.contact-checkbox input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    display: grid;
    place-content: center;
    border: 1.5px solid var(--navy);
    border-radius: 5px;
    background: var(--white);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.contact-checkbox input::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: transform .12s ease-in-out;
    box-shadow: inset 1em 1em var(--white);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.contact-checkbox input:checked {
    background: var(--cta);
    border-color: var(--cta);
}

.contact-checkbox input:checked::before {
    transform: scale(1);
}

.contact-checkbox input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgb(var(--cta-rgb) / 0.12);
}

.contact-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: .78125rem;
    color: var(--muted);
    text-align: center;
}

.contact-secure svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
    flex-shrink: 0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    font-size: .9375rem;
    color: var(--navy);
    background: var(--white);
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgb(var(--cta-rgb) / 0.12);
}

.contact-form textarea {
    resize: vertical;
    min-height: 96px;
}

.contact-fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.contact-fieldset .contact-label {
    display: block;
    margin-bottom: 10px;
}

.contact-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-pill-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-weight: 500;
    font-size: .875rem;
    color: var(--navy);
    background: var(--white);
    cursor: pointer;
    user-select: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.contact-pill:hover {
    border-color: var(--muted-2);
    background: var(--soft);
}

.contact-pill-input:checked + .contact-pill {
    background: var(--cta);
    border-color: var(--cta);
    color: var(--white);
}

.contact-pill-input:focus-visible + .contact-pill {
    box-shadow: 0 0 0 3px rgb(var(--cta-rgb) / 0.18);
}

.contact-actions {
    align-items: center;
    margin-top: 4px;
}

.contact-submit {
    align-self: center;
    min-width: 140px;
}

.contact-status {
    margin: 0;
    font-size: .875rem;
    color: var(--muted);
    text-align: center;
}

.contact-status:empty {
    display: none;
}

.contact-status:not(:empty) {
    margin-top: 8px;
}

.contact-status.is-success {
    color: var(--success-text);
}

.contact-status.is-error {
    color: var(--cta);
}

.contact-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 24px 8px 12px;
}

.contact-success:focus {
    outline: none;
}

.contact-form.is-done .contact-success {
    display: flex;
}

.contact-success-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgb(var(--success-rgb) / 0.12);
    color: var(--success);
    box-shadow: 0 0 0 10px rgb(var(--success-rgb) / 0.06);
}

.contact-success-icon svg {
    width: 34px;
    height: 34px;
    display: block;
}

.contact-success-title {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.contact-success-text {
    margin: 0;
    max-width: 38ch;
    color: var(--muted);
    font-size: .9375rem;
    line-height: 1.55;
}

.contact-form.is-done .contact-success-icon {
    animation: contactSuccessPop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}

.contact-form.is-done .contact-success-title {
    animation: contactSuccessRise .4s ease .12s both;
}

.contact-form.is-done .contact-success-text {
    animation: contactSuccessRise .4s ease .2s both;
}

@keyframes contactSuccessPop {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes contactSuccessRise {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.contact-modal-dialog:has(.contact-form.is-done) .contact-modal-title {
    display: none;
}

@media (max-width: 600px) {
    .contact-modal-dialog {
        padding: 28px;
        border-radius: 20px;
    }

    .contact-modal-title {
        font-size: 1.5rem;
    }

    .contact-modal-sub {
        font-size: .875rem;
        margin-bottom: 20px;
    }

    .contact-row-2 {
        grid-template-columns: 1fr;
    }
}

body:has(.contact-modal[open]) {
    overflow: hidden;
}

.contact-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
