/* Modal de aviso institucional (imagem upload CMS) */

.nh-sam {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.nh-sam[hidden] {
    display: none !important;
}

.nh-sam.is-open {
    display: flex;
}

.nh-sam__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nh-sam__panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(100%, 28rem);
    max-height: min(92vh, 52rem);
    border-radius: 1rem;
    background: #fff;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 32px 64px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: nh-sam-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes nh-sam-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.nh-sam__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #71130d;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nh-sam__close:hover {
    transform: scale(1.06);
    background: #fff;
}

.nh-sam__media-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #f3f3f3;
}

.nh-sam__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.nh-sam__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(26, 28, 28, 0.08);
    background: #fff;
}

.nh-sam__dismiss-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #5f5e5e;
    cursor: pointer;
    user-select: none;
}

.nh-sam__dismiss-check {
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: #71130d;
}

.nh-sam__action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.nh-sam__btn-dismiss {
    border: none;
    border-radius: 0.5rem;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    background: #71130d;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nh-sam__btn-dismiss:hover {
    opacity: 0.9;
}

.nh-sam__auto-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #5f5e5e;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 480px) {
    .nh-sam__panel {
        width: min(100%, 32rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nh-sam__panel {
        animation: none;
    }
}
