/**
 * Loyalty User Menu Widget — Styles
 * Loaded on pages containing [loyalty_user_menu] shortcode.
 */

.loyalty-user-menu-widget {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e3a6e;
    line-height: 1;
}

/* ======================== Site Footer ======================== */
.loyalty-site-footer {
    background: #0a3478;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.loyalty-site-footer *,
.loyalty-site-footer *::before,
.loyalty-site-footer *::after {
    box-sizing: border-box;
}

/* 4 columns, 400px gap, group centered, columns top-aligned */
.loyalty-site-footer-inner {
    width: 100%;
    margin: 0 auto;
    padding: 56px 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 400px;
    flex-wrap: nowrap;
}

.loyalty-footer-col {
    flex: 0 0 auto;
    min-width: 0;
}

/* ---- Address (left) ---- */
.loyalty-footer-address {
    width: 220px;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 400;
    text-align: left;
}

.loyalty-footer-address p {
    margin: 0 0 12px;
}

.loyalty-footer-address p:last-child {
    margin-bottom: 0;
}

/* ---- Shared heading ---- */
.loyalty-footer-heading {
    margin: 0 0 16px;
    padding: 0;
    font-size: 15px;
    font-weight: 400;
    color: #ffffff;
    line-height: 1.3;
    text-align: center;
}

/* ---- Royalty Program ---- */
.loyalty-footer-program {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loyalty-footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loyalty-footer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    height: 34px;
    padding: 0 28px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: transparent;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: background 0.2s ease;
}

.loyalty-footer-pill:hover,
.loyalty-footer-pill:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    outline: none;
}

/* ---- Social Media ---- */
.loyalty-footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.loyalty-footer-social-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loyalty-footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    text-decoration: none !important;
    flex-shrink: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.loyalty-footer-social-btn:hover,
.loyalty-footer-social-btn:focus-visible {
    opacity: 0.9;
    transform: translateY(-1px);
    outline: none;
}

.loyalty-footer-social-btn.is-linkedin {
    background: #0a66c2;
}

.loyalty-footer-social-btn.is-instagram {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.loyalty-footer-social-btn.is-facebook {
    background: #1877f2;
}

.loyalty-footer-social-btn svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* ---- Brand / Logo ---- */
.loyalty-footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loyalty-footer-logo {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
}

/* ---- Responsive: keep centered, shrink gap ---- */
@media (max-width: 1800px) {
    .loyalty-site-footer-inner {
        gap: 200px;
    }
}

@media (max-width: 1200px) {
    .loyalty-site-footer-inner {
        gap: 80px;
        padding: 48px 32px;
    }
}

@media (max-width: 900px) {
    .loyalty-site-footer-inner {
        flex-wrap: wrap;
        gap: 40px 60px;
        justify-content: center;
    }

    .loyalty-footer-address {
        width: auto;
        max-width: 260px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .loyalty-site-footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        padding: 40px 24px;
    }

    .loyalty-footer-address {
        text-align: center;
    }

    .loyalty-footer-logo {
        width: 180px;
    }
}

.personal-center {
    padding: 2rem;
    border-radius: 50%;
    background-color: #40a9ff;
    color: #fff;
}

/* Join button — pill style */
.loyalty-user-menu-widget .loyalty-btn,
.loyalty-user-menu-widget .loyalty-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    border: 1.5px solid #1e3a6e;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: none;
}

.loyalty-user-menu-widget .loyalty-btn-primary,
.loyalty-user-menu-widget .loyalty-join-btn {
    background: #ffffff;
    color: #1e3a6e !important;
    border-color: #1e3a6e;
}

.loyalty-user-menu-widget .loyalty-btn-primary:hover,
.loyalty-user-menu-widget .loyalty-btn-primary:focus-visible,
.loyalty-user-menu-widget .loyalty-join-btn:hover,
.loyalty-user-menu-widget .loyalty-join-btn:focus-visible {
    background: #f3f7ff;
    border-color: #16305c;
    color: #16305c !important;
    outline: none;
}

.loyalty-user-menu-widget .loyalty-join-icon,
.loyalty-user-menu-widget .loyalty-btn svg,
.loyalty-user-menu-widget .loyalty-btn .icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px;
    display: block;
    color: currentColor;
}

.loyalty-user-menu-widget .loyalty-join-label {
    display: inline-block;
}

/* Divider between join/user and language */
.loyalty-user-menu-widget .loyalty-menu-divider {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: #1e3a6e;
    opacity: 0.55;
    flex-shrink: 0;
}

/* Language switcher */
.loyalty-user-menu-widget .loyalty-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.loyalty-user-menu-widget .loyalty-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 4px;
    border: none;
    background: transparent;
    color: #1e3a6e;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1;
}

.loyalty-user-menu-widget .loyalty-lang-trigger:hover,
.loyalty-user-menu-widget .loyalty-lang-trigger:focus-visible {
    color: #16305c;
    outline: none;
}

.loyalty-user-menu-widget .loyalty-lang-code {
    line-height: 1;
}

.loyalty-user-menu-widget .loyalty-lang-caret {
    display: inline-flex;
    align-items: center;
    color: currentColor;
    transition: transform 0.15s ease;
}

.loyalty-user-menu-widget .loyalty-lang-switcher.is-open .loyalty-lang-caret {
    transform: rotate(180deg);
}

.loyalty-user-menu-widget .loyalty-lang-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 88px;
    padding: 4px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
}

.loyalty-user-menu-widget .loyalty-lang-panel[hidden] {
    display: none !important;
}

.loyalty-user-menu-widget .loyalty-lang-panel.open {
    display: block;
}

.loyalty-user-menu-widget .loyalty-lang-option {
    display: block;
    padding: 8px 14px;
    color: #1e3a6e !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.loyalty-user-menu-widget .loyalty-lang-option:hover,
.loyalty-user-menu-widget .loyalty-lang-option:focus-visible {
    background: #f3f7ff;
    outline: none;
}

.loyalty-user-menu-widget .loyalty-lang-option.is-active {
    font-weight: 700;
    background: #eef4ff;
}

/* Logged-in: dropdown */
.loyalty-user-menu-widget .loyalty-user-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.loyalty-user-menu-widget .loyalty-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #f5f5f5 !important;
    transition: background 0.2s;
    text-decoration: none;
    color: #333 !important;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.loyalty-user-menu-widget .loyalty-user-trigger:hover {
    background: #e6e6e6;
}

.loyalty-user-menu-widget .loyalty-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #172C57;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.loyalty-user-menu-widget .loyalty-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.loyalty-user-menu-widget .loyalty-dropdown-arrow {
    font-size: 10px;
    color: #999;
    margin-left: 2px;
    cursor: pointer;
    padding: 6px;
    transition: transform 0.2s;
    user-select: none;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    padding: 4px 0;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel[hidden] {
    display: none !important;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel.open {
    display: block;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel a,
.loyalty-user-menu-widget .loyalty-dropdown-panel .loyalty-menu-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    text-decoration: none;
    color: #333 !important;
    font-size: 14px;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel a:hover,
.loyalty-user-menu-widget .loyalty-dropdown-panel .loyalty-menu-btn:hover {
    background: #f5f5f5 !important;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel .loyalty-dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

.loyalty-user-menu-widget .loyalty-dropdown-panel .loyalty-menu-item-danger {
    color: #ff4d4f !important;
}

.loyalty-user-menu-widget .loyalty-menu-item-icon {
    margin-right: 8px;
    font-size: 14px;
}

/* ============================================
   Menu User — compact nav-menu shortcode
   [loyalty_menu_user]
   ============================================ */

.loyalty-menu-user {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.loyalty-menu-user .loyalty-menu-user-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
    line-height: 1;
}

.loyalty-menu-user .loyalty-menu-user-link:hover {
    opacity: 0.8;
}

/* Avatar initial circle */
.loyalty-menu-user .loyalty-menu-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1890ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Username text */
.loyalty-menu-user .loyalty-menu-user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Guest icon (logged out) */
.loyalty-menu-user .loyalty-menu-user-icon {
    display: block;
    color: #555;
    transition: color 0.2s;
}

.loyalty-menu-user .loyalty-menu-user-guest:hover .loyalty-menu-user-icon {
    color: #1890ff;
}

/* ======================== Mobile ======================== */
@media (max-width: 768px) {
    .loyalty-user-menu-widget {
        gap: 10px;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .loyalty-user-menu-widget .loyalty-btn,
    .loyalty-user-menu-widget .loyalty-join-btn {
        height: 34px;
        padding: 0 14px;
        font-size: 13px;
    }

    .loyalty-user-menu-widget .loyalty-user-name {
        max-width: 96px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .loyalty-user-menu-widget .loyalty-dropdown-panel,
    .loyalty-user-menu-widget .loyalty-lang-panel {
        right: 0;
        left: auto;
        min-width: 160px;
        max-width: min(240px, calc(100vw - 24px));
    }

    .loyalty-user-menu-widget .loyalty-dropdown-panel a,
    .loyalty-user-menu-widget .loyalty-dropdown-panel .loyalty-menu-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .loyalty-user-menu-widget .loyalty-menu-divider {
        display: none;
    }

    .loyalty-site-footer-inner {
        padding: 32px 16px;
        gap: 28px;
    }

    .loyalty-footer-pill {
        min-width: 0;
        width: 100%;
        max-width: 220px;
        height: 40px;
    }

    .loyalty-footer-logo {
        width: 150px;
    }
}

