.theme-contact-form-shell {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 28px 0;
    padding: 28px;
    border: 1px solid #dde5ed;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.theme-contact-form-shell *,
.theme-contact-form-shell *::before,
.theme-contact-form-shell *::after {
    box-sizing: border-box;
}

.theme-contact-form-shell::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #d20243 0%, #0073aa 100%);
    opacity: 0.9;
}

.theme-contact-form-shell__header {
    min-width: 0;
    margin-bottom: 20px;
}

.theme-contact-form-shell__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(210, 2, 67, 0.12);
    background: rgba(210, 2, 67, 0.06);
    color: #d20243;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-contact-form-shell__title {
    margin: 14px 0 10px;
    color: #0f172a;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.theme-contact-form-shell__intro {
    margin: 0;
    color: #475569;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.theme-contact-form__notice {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #d8e1eb;
    overflow-wrap: anywhere;
}

.theme-contact-form__notice p {
    margin: 0;
}

.theme-contact-form__notice--success {
    border-color: rgba(22, 163, 74, 0.18);
    background: linear-gradient(180deg, #f3fcf6 0%, #eefbf2 100%);
    color: #166534;
}

.theme-contact-form__notice--error {
    border-color: rgba(210, 2, 67, 0.16);
    background: linear-gradient(180deg, #fff7f8 0%, #fff2f5 100%);
    color: #9f1239;
}

.theme-contact-form__notice-subtext {
    margin-top: 6px !important;
    font-size: 0.92rem;
    opacity: 0.9;
}

.theme-contact-form {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.theme-contact-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 18px;
    min-width: 0;
}

.theme-contact-form__field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.theme-contact-form__field label {
    color: #1e293b;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.theme-contact-form__field input,
.theme-contact-form__field textarea,
.theme-contact-form__field select {
    width: 100%;
    border: 1px solid #d8e1eb;
    border-radius: 16px;
    background: #fff;
    color: #0f172a;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.theme-contact-form__field input {
    min-height: 48px;
    padding: 0 16px;
}

.theme-contact-form__field textarea {
    min-height: 180px;
    padding: 14px 16px;
    line-height: 1.8;
    resize: vertical;
}

.theme-contact-form__field select {
    min-height: 48px;
    padding: 0 16px;
}

.theme-contact-form__field input:focus,
.theme-contact-form__field textarea:focus,
.theme-contact-form__field select:focus {
    outline: none;
    border-color: rgba(0, 115, 170, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.12);
    background: #fff;
}

.theme-contact-form__help,
.theme-contact-form__meta {
    margin: 0;
    color: #64748b;
    font-size: 0.93rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.theme-contact-form__error-message {
    margin: 0;
    color: #b91c1c;
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.theme-contact-form__captcha {
    display: grid;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.theme-contact-form__captcha .cf-turnstile {
    min-height: 66px;
    max-width: 100%;
    overflow-x: auto;
}

.theme-contact-form__captcha iframe {
    max-width: 100% !important;
}

.theme-contact-form__checks {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    min-width: 0;
}

.theme-contact-form__check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #334155;
    line-height: 1.7;
    min-width: 0;
    overflow-wrap: anywhere;
}

.theme-contact-form__check input {
    margin-top: 0.32em;
}

.theme-contact-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 18px;
    min-width: 0;
}

.theme-contact-form__actions .theme-contact-form__meta {
    flex: 1 1 240px;
    min-width: 0;
}

.theme-contact-form__submit {
    flex: 0 0 auto;
    min-width: 160px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #d20243 0%, #b60239 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 16px 26px rgba(210, 2, 67, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.theme-contact-form__submit:hover,
.theme-contact-form__submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(210, 2, 67, 0.28);
    filter: brightness(1.02);
}

.theme-contact-form__submit:focus-visible {
    outline: 3px solid rgba(0, 115, 170, 0.2);
    outline-offset: 2px;
}

.theme-contact-form__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .theme-contact-form-shell {
        padding: 20px;
        border-radius: 20px;
    }

    .theme-contact-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .theme-contact-form__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .theme-contact-form__submit {
        width: 100%;
    }
}

@media (max-width: 479px) {
    .theme-contact-form-shell {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .theme-contact-form__checks {
        padding: 14px;
    }

    .theme-contact-form__field input,
    .theme-contact-form__field textarea,
    .theme-contact-form__field select {
        border-radius: 12px;
    }
}
