.cabo-s-modal {
    --cabo-bg: #fff;
    --cabo-text: #111827;
    --cabo-muted: #6b7280;
    --cabo-border: #e5e7eb;
    --cabo-focus: #8a431f;
    --cabo-radius: 12px;
    --cabo-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.cabo-s-modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .55);
    display: grid;
    place-items: center;
    z-index: 9999;
    overflow: auto;
    padding: max(24px, 4vh) 16px
}

.cabo-s-modal[hidden] {
    display: none
}

.cabo-s-modal__dialog {
    position: relative;
    background: var(--cabo-bg);
    color: var(--cabo-text);
    padding: 20px;
    border-radius: var(--cabo-radius);
    max-width: 560px;
    width: min(92%, 560px);
    box-shadow: var(--cabo-shadow);
    transform: translateY(6px) scale(.995);
    opacity: .98;
    transition: .2s ease;
    max-height: min(90dvh, 720px);
    overflow: auto
}

.cabo-s-modal:not([hidden]) .cabo-s-modal__dialog {
    transform: none;
    opacity: 1
}

.cabo-s-modal__close {
    position: absolute;
    top: .5rem;
    right: .75rem;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--cabo-muted)
}

.cabo-s-modal__close:hover {
    color: var(--cabo-text)
}

#cabo-s-title {
    margin: 0
}

#cabo-s-sub {
    margin: .25rem 0 0;
    color: var(--cabo-muted)
}

/* Ensure all fields compute width including padding/borders and never overflow */
.cabo-s-form *, .cabo-s-form *::before, .cabo-s-form *::after {
    box-sizing: border-box;
}

.cabo-s-form img, .cabo-s-form input, .cabo-s-form textarea, .cabo-s-form select, .cabo-s-form button {
    max-width: 100%;
}

.cabo-s-form {
    margin-top: .5rem
}

.cabo-s-grid {
    display: grid;
    grid-template-columns:minmax(0, 1fr);
    gap: 14px
}

@media (min-width: 540px) {
    .cabo-s-grid {
        grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)
    }

    .cabo-s-field--full {
        grid-column: 1 / -1
    }
}

.cabo-s-label {
    display: block;
    font-weight: 600;
    margin: 0 0 .35rem
}

.cabo-s-req {
    color: #ef4444;
    margin-left: 4px
}

.cabo-s-input {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid var(--cabo-border);
    border-radius: 10px;
    background: #fff;
    max-width: 100%
}

.cabo-s-input::placeholder {
    color: #9ca3af
}

.cabo-s-input:focus {
    outline: 0;
    border-color: var(--cabo-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cabo-focus) 25%, transparent)
}

.cabo-s-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.cabo-s-status {
    margin-top: .5rem;
    min-height: 1rem;
    color: var(--cabo-muted)
}

.cabo-s-status.is-error {
    color: #ef4444
}

.cabo-s-status.is-success {
    color: #22c55e
}

.cabo-s-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end
}

.cabo-s-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    border-radius: 100px;
    padding: .7rem 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: #111;
    color: #fff;
    transition: filter .15s ease, transform .05s ease
}

.cabo-s-btn:hover {
    filter: brightness(1.05)
}

.cabo-s-btn:active {
    transform: translateY(1px)
}

.cabo-s-btn[disabled] {
    opacity: .6;
    cursor: not-allowed
}

.cabo-s-btn__spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: cabo-s-spin .8s linear infinite;
    display: none
}

.cabo-s-form.is-loading .cabo-s-btn__spinner {
    display: inline-block
}

.cabo-s-result {
    text-align: center;
    padding: 24px 12px
}

.cabo-s-result__icon {
    display: inline-flex;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    font-size: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    line-height: 1;
    border: 4px solid currentColor;
    color: currentColor
}

.cabo-s-result__title {
    margin: 8px 0 4px;
    font-size: 20px
}

.cabo-s-result__text {
    margin: 0 0 16px
}

.cabo-s-result.is-success {
    color: #22c55e
}

.cabo-s-result.is-error {
    color: #ef4444
}

@keyframes cabo-s-spin {
    to {
        transform: rotate(360deg)
    }
}