 /**
 * استایل‌های فرانت‌اند افزونه حساب کاربری
 */

/* فونت انجمن */
.map-login-button-wrapper,
.map-login-button,
.map-dropdown-menu,
.map-modal {
    font-family: Anjoman, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* دکمه اصلی */
.map-login-button-wrapper {
    position: relative;
    display: inline-block;

}
.map-login-button.map-logged-in {
    background-color: var(--map-button-bg, #0073aa);
    color: var(--map-button-text, #ffffff);
    border-radius: 10px;
    padding: 8px 8px;
}

.map-login-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--map-button-radius, 4px);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map-login-button.map-logged-out {
    background-color: var(--map-button-bg, #0073aa);
    color: var(--map-button-text, #ffffff);
}

.map-login-button.map-logged-out:hover {
    background-color: var(--map-button-hover-bg, #005177);
    color: var(--map-button-hover-text, #ffffff);
}

.map-login-button.map-logged-in {
    background-color: var(--map-button-bg, #0073aa);
    color: var(--map-button-text, #ffffff);
}

.map-login-button.map-logged-in:hover {
    background-color: var(--map-button-hover-bg, #005177);
    color: var(--map-button-hover-text, #ffffff);
}

/* آیکون‌ها */
.map-user-icon,
.map-arrow {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.map-button-text {
    white-space: nowrap;
}

.map-login-button-wrapper.active .map-arrow {
    transform: rotate(180deg);
}

/* منوی کشویی */
.map-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.map-login-button-wrapper.active .map-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.map-menu-item {
    display: block;
    padding: 12px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.map-menu-item:hover {
    background-color: #f5f5f5;
}

.map-menu-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 8px 0;
}

.map-logout-trigger {
    color: #d63638;
    font-weight: 500;
}

.map-logout-trigger:hover {
    background-color: #fef2f2;
}

/* مودال خروج */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: mapFadeIn 0.3s ease;
}

.map-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: mapSlideUp 0.3s ease;
}

.map-modal-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

.map-modal-text {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
}

.map-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.map-modal-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.map-logout-confirm {
    background-color: #d63638;
    color: #ffffff;
}

.map-logout-confirm:hover {
    background-color: #b32d2e;
}

.map-logout-cancel {
    background-color: #f0f0f0;
    color: #333333;
}

.map-logout-cancel:hover {
    background-color: #e0e0e0;
}

/* انیمیشن‌ها */
@keyframes mapFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes mapSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .map-modal-content {
        padding: 20px;
    }
    
    .map-modal-buttons {
        flex-direction: column;
    }
    
    .map-modal-button {
        width: 100%;
    }
}


/* پشتیبانی از RTL */
[dir="rtl"] .map-dropdown-menu {
    left: auto;
    right: 0;
}

/* اطمینان از عدم ایجاد اسکرول افقی */
.map-login-button-wrapper {
    max-width: 100%;
}

.map-dropdown-menu {
    white-space: nowrap;
}
