.ssam-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.25);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.ssam-overlay[hidden] {
    display: none;
}

.ssam-overlay.ssam-visible {
    opacity: 1;
}

html.ssam-lock,
html.ssam-lock body {
    overflow: hidden;
}

.ssam-card {
    font-family: 'Roboto', sans-serif;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 24px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s ease-out;
}

.ssam-overlay.ssam-visible .ssam-card {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .ssam-overlay,
    .ssam-card {
        transition: none;
    }
}

@media (max-width: 480px) {
    .ssam-overlay {
        padding: 12px;
    }
    .ssam-card {
        padding: 20px;
    }
}

.ssam-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 8px;
}

.ssam-text {
    margin: 0;
    font-size: 13.5px;
    color: #555;
}

.ssam-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ssam-btn {
    flex: 1 1 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.ssam-btn-primary {
    background: #c41e3a;
    color: #fff;
}

.ssam-btn-primary:hover {
    background: #a3182f;
}

.ssam-btn-secondary {
    background: #e9e9e9;
    color: #1f2937;
}

.ssam-btn-secondary:hover {
    background: #dcdcdc;
}

.ssam-links {
    margin-top: 10px;
    font-size: 12px;
    color: #767676;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ssam-links a {
    color: #666;
    text-decoration: underline;
}

.ssam-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

.ssam-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.ssam-rowtext {
    font-size: 13px;
}

.ssam-rowtext small {
    color: #6b6b6b;
}

.ssam-rowtext a {
    color: #666;
    text-decoration: underline;
}

.ssam-rowtext code {
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

.ssam-details {
    margin-top: 4px;
    font-size: 12px;
}

.ssam-details summary {
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    list-style: none;
    display: inline;
}

.ssam-details summary::-webkit-details-marker {
    display: none;
}

.ssam-details p {
    margin: 6px 0 0;
    color: #6b6b6b;
}

.ssam-note {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: #767676;
}

.ssam-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.ssam-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.ssam-switch span {
    display: block;
    width: 34px;
    height: 20px;
    border-radius: 10px;
    background: #ccc;
    transition: background 0.15s ease-out;
}

.ssam-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease-out;
}

.ssam-switch input:checked + span {
    background: #c41e3a;
}

.ssam-switch input:checked + span::after {
    transform: translateX(14px);
}

.ssam-switch input:focus-visible + span {
    outline: 2px solid #c41e3a;
    outline-offset: 2px;
}

.ssam-switch-locked span {
    opacity: 0.55;
}

.ssam-switch-locked input {
    cursor: default;
}

a.ssam-inlinebtn,
button.ssam-inlinebtn {
    display: inline-block;
    flex: none;
    text-decoration: none;
}

a.ssam-inlinebtn,
a.ssam-inlinebtn:hover {
    color: #fff;
}

.ssam-status {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 12px 0 0;
    background: #f9fafb;
    font-size: 14px;
}

.ssam-status ul {
    list-style: disc;
    list-style-position: inside;
    margin: 6px 0;
}

.ssam-status code {
    word-break: break-all;
    font-size: 13px;
}

.ssam-status .ssam-inlinebtn {
    font-family: 'Poppins', sans-serif;
}

.ssam-head,
.ssam-btn {
    font-family: 'Poppins', sans-serif;
}
