.form-notifications {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 10px;
    padding: 13px 16px;
    border: 1px solid #d0e9d3;
    border-radius: 4px;
    background: #f1f8f2;
    color: #285b30;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    pointer-events: auto;
    overflow-wrap: anywhere;
}

.form-notice > span { flex: 1; }
.form-notice-close {
    border: 0;
    padding: 0 2px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.async-form-summary {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-left: 3px solid #a94442;
    background: #fff4f3;
    color: #a94442;
    overflow-wrap: anywhere;
}

.async-form-summary[hidden] { display: none; }
.async-form-summary ul { margin: 6px 0 0; padding-left: 20px; }
.async-field-error { display: block; margin: 5px 0 0; color: #a94442; }
.form-character-count {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 12px;
    text-align: right;
}

#contact-form .form-control {
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

#contact-form .form-control:focus {
    outline: 0;
    border-color: #46b8da;
    background-color: #f4fcfe;
    box-shadow: 0 0 0 3px rgba(70, 184, 218, .18);
}

#contact-form .form-group:focus-within > label {
    color: #31708f;
}

#contact-form .form-control[aria-invalid="true"]:focus {
    border-color: #a94442;
    box-shadow: 0 0 0 3px rgba(169, 68, 66, .14);
}

#contact-form #topicDetail {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    resize: vertical;
    overflow: auto;
}

@media (prefers-reduced-motion: reduce) {
    #contact-form .form-control { transition: none; }
}

[data-async-form] [aria-invalid="true"] { border-color: #a94442; }
[data-async-form] [type="submit"]:disabled { cursor: wait; opacity: .65; }

.form-confirm-dialog {
    position: fixed;
    inset: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: auto;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
    overflow: auto;
}

.form-confirm-dialog:not([open]) { display: none; }
.form-confirm-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.form-confirm-dialog h4 { margin: 0 0 14px; }
.form-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
body.form-confirm-open { overflow: hidden; }

@media (max-width: 600px) {
    .form-notifications { top: 16px; right: 16px; }
}
