/* Sofona Notify - all rules scoped under .sofona-notify, no bare element selectors. */

.sofona-notify {
    display: inline-block;
}

.sofona-notify__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65em 1.4em;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    background-color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 0.4em;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sofona-notify__button:hover,
.sofona-notify__button:focus-visible {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.sofona-notify__overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: rgba(15, 23, 42, 0.55);
}

.sofona-notify__overlay[hidden] {
    display: none;
}

.sofona-notify__modal {
    position: relative;
    width: 100%;
    max-width: 26rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 0.6em;
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    box-sizing: border-box;
}

.sofona-notify__close {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    line-height: 1;
    font-size: 1.5rem;
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    border-radius: 0.3em;
}

.sofona-notify__close:hover,
.sofona-notify__close:focus-visible {
    color: #0f172a;
    background-color: #f1f5f9;
}

.sofona-notify__title {
    margin: 0 1.75rem 1rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.sofona-notify__field {
    margin-bottom: 0.85rem;
}

.sofona-notify__field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.sofona-notify__field input,
.sofona-notify__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55em 0.75em;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.4em;
}

.sofona-notify__field input:focus,
.sofona-notify__field textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

.sofona-notify__field textarea {
    resize: vertical;
    min-height: 4.5em;
}

.sofona-notify__hp {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sofona-notify__error {
    margin: 0.5rem 0 0;
    padding: 0.6em 0.8em;
    font-size: 0.85rem;
    color: #991b1b;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.4em;
}

.sofona-notify__error[hidden] {
    display: none;
}

.sofona-notify__actions {
    margin-top: 1rem;
    text-align: right;
}

.sofona-notify__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6em 1.4em;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #16a34a;
    border: 1px solid #16a34a;
    border-radius: 0.4em;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.sofona-notify__submit:hover,
.sofona-notify__submit:focus-visible {
    background-color: #15803d;
}

.sofona-notify__submit:disabled,
.sofona-notify__submit.is-loading {
    opacity: 0.7;
    cursor: default;
}

.sofona-notify__success {
    margin-top: 0.5rem;
    text-align: center;
}

.sofona-notify__success[hidden] {
    display: none;
}

.sofona-notify__success p {
    margin: 0 0 1rem;
    white-space: pre-line;
    color: #0f172a;
    font-size: 0.95rem;
}

.sofona-notify__close-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55em 1.3em;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 0.4em;
    cursor: pointer;
}

.sofona-notify__close-secondary:hover,
.sofona-notify__close-secondary:focus-visible {
    background-color: #e2e8f0;
}

@media (max-width: 480px) {
    .sofona-notify__modal {
        max-width: 100%;
        padding: 1.5rem 1.1rem 1.25rem;
        border-radius: 0.5em;
    }

    .sofona-notify__button {
        width: 100%;
    }
}
