/* =========================================================
   WIDGETS — عناصر شناور: Toast، Modal، نوار چسبان موبایل
   ========================================================= */

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--primary-dark);
    color: var(--white);
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    text-align: center;
    max-width: 90vw;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.toast.success {
    background: #2a9d6e;
}
.toast.error {
    background: var(--accent);
}
.toast .close-toast {
    margin-right: 16px;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: var(--transition);
    background: none;
    border: none;
    color: var(--white);
}
.toast .close-toast:hover {
    opacity: 1;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal .close-modal {
    position: absolute;
    top: 16px;
    left: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
}
.modal .close-modal:hover {
    color: var(--text);
}
.modal h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}
.modal p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ===== STICKY MOBILE BAR ===== */
.sticky-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    z-index: 999;
    gap: 8px;
    justify-content: space-around;
    border-top: 1px solid var(--surface-alt);
}
.sticky-mobile .btn {
    flex: 1;
    padding: 12px 12px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}
