/* ==== کانتینر و آیتم ها ==== */
.sa-container {
    margin: 20px 0;
    font-family: inherit;
}

.sa-item {
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: box-shadow .12s ease, transform .12s ease;
}

.sa-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.sa-title {
    margin: 0;
    font-size: 16px;
    color: #222;
    font-weight: 600;
}

/* دکمه */
.sa-view-btn {
    background: linear-gradient(180deg, #2271b1, #135e96);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(19, 92, 150, 0.12);
}

.sa-view-btn:hover {
    opacity: .95;
    transform: translateY(-1px);
}

/* ==== مودال ==== */
/* پیش‌فرض پنهان: نمایش با اضافه‌شدن کلاس sa-open یا aria-hidden=false نمایش داده می‌شود */
.sa-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.56);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sa-modal[aria-hidden="false"] {
    display: flex;
}

/* محتوای مودال */
.sa-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 760px;
    max-height: 86%;
    overflow: auto;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.36);
    animation: saModalIn .26s cubic-bezier(.2, .9, .2, 1);
}

@keyframes saModalIn {
    from {
        transform: translateY(-8px) scale(.995);
        opacity: 0
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1
    }
}

/* هدر مودال */
.sa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 12px 12px 0 0;
}

#saModalTitle {
    margin: 0;
    font-size: 18px;
    color: #222;
    font-weight: 700;
}

/* دکمه بستن */
button.sa-close {
    background-color: red !important;
    border: 0;
    color: white;
    border-radius: 8px;
}

.sa-close:hover {
    color: #d33;
    background: rgba(0, 0, 0, 0.02);
}

/* بدنه مودال */
.sa-modal-body {
    padding: 18px;
    font-size: 15px;
    color: #444;
    line-height: 1.7;
}

/* محتوای مخفی (در DOM) */
.sa-hidden-content {
    display: none;
}

/* responsive */
@media (max-width:640px) {
    .sa-modal-content {
        max-width: 420px;
        padding: 0;
    }

    .sa-modal-body {
        padding: 14px;
    }

    .sa-view-btn {
        padding: 7px 10px;
    }
}