/* ============================================================
   LOGIN WELCOME MODAL — پنجره خوش‌آمدگویی بیرونی (لاگین)
   ============================================================ */

.lwm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 9600;
    direction: rtl;
    animation: lwmFadeIn 0.25s ease-out;
}

.lwm-overlay.show {
    display: flex;
}

@keyframes lwmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.lwm-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: lwmSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

body.dark .lwm-modal {
    background: #1e293b;
    color: #f1f5f9;
}

@keyframes lwmSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Close button ===== */
.lwm-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    font-family: inherit;
    z-index: 10;
}

body.dark .lwm-close {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.lwm-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    transform: scale(1.1);
}

/* ===== Body ===== */
.lwm-body {
    overflow-y: auto;
    padding: 36px 28px 28px;
    text-align: center;
}

.lwm-body::-webkit-scrollbar { width: 6px; }
.lwm-body::-webkit-scrollbar-track { background: transparent; }
.lwm-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

body.dark .lwm-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Head title ===== */
.lwm-head-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.4;
    word-break: break-word;
}

/* ===== Title ===== */
.lwm-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.6;
    word-break: break-word;
}

/* ===== PM One ===== */
.lwm-pm-one {
    font-size: 0.85rem;
    line-height: 1.9;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    word-break: break-word;
}

body.dark .lwm-pm-one {
    background: rgba(255, 255, 255, 0.04);
}

/* ===== URLs ===== */
.lwm-urls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.lwm-url-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    font-size: 0.78rem;
    transition: all 0.15s;
    word-break: break-all;
    text-align: right;
}

body.dark .lwm-url-item {
    background: rgba(255, 255, 255, 0.04);
}

.lwm-url-item:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(-2px);
}

.lwm-url-item .icon {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.lwm-url-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lwm-url-item a:hover {
    text-decoration: underline;
}

/* ===== Link ===== */
.lwm-link-section {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lwm-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    border-radius: 10px;
    background: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.lwm-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ===== ID/Phone ===== */
.lwm-id-tel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 16px 0;
    direction: ltr;
    word-break: break-all;
}

body.dark .lwm-id-tel {
    background: rgba(255, 255, 255, 0.04);
}

.lwm-id-tel .icon {
    direction: rtl;
    font-size: 0.95rem;
}

/* ===== PM Else ===== */
.lwm-pm-else {
    font-size: 0.8rem;
    line-height: 1.9;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    opacity: 0.85;
    word-break: break-word;
}

body.dark .lwm-pm-else {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
    .lwm-overlay { padding: 10px; }
    .lwm-modal { border-radius: 14px; max-height: calc(100vh - 20px); }
    .lwm-body { padding: 30px 18px 22px; }
    .lwm-head-title { font-size: 1.25rem; }
    .lwm-title { font-size: 0.95rem; }
    .lwm-pm-one { font-size: 0.78rem; padding: 10px 12px; }
    .lwm-url-item { font-size: 0.72rem; padding: 8px 12px; }
    .lwm-link-btn { padding: 10px 20px; font-size: 0.82rem; }
    .lwm-id-tel { font-size: 0.78rem; padding: 8px 14px; }
}