/* La Bodeteka Simple Site Header + Account Popup */

.lbd-sh {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.lbd-sh,
.lbd-sh *,
.lbd-sh *::before,
.lbd-sh *::after,
.lbd-sh-modal,
.lbd-sh-modal *,
.lbd-sh-modal *::before,
.lbd-sh-modal *::after {
    box-sizing: border-box;
}

/* Header bar */
.lbd-sh-bar {
    width: 100%;
    display: flex;
    align-items: center;
    background-color: rgba(24, 20, 17, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lbd-sh-bar.is-sticky {
    position: sticky;
    top: 0;
    z-index: 990;
}

.lbd-sh-bar.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 990;
}

.lbd-sh-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 20px;
}

/* Account icon button */
.lbd-sh-icon {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    border: 0;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.lbd-sh-icon:hover,
.lbd-sh-icon:focus-visible {
    background-color: #b08a56;
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.lbd-sh-icon:active {
    transform: translateY(0) scale(0.97);
}

.lbd-sh-icon-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lbd-sh-icon-glyph svg {
    width: 1em;
    height: 1em;
    display: block;
    fill: currentColor;
}

.lbd-sh-icon-glyph i {
    line-height: 1;
}

.lbd-sh-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}

/* Body scroll lock */
html.lbd-sh-lock,
html.lbd-sh-lock body {
    overflow: hidden !important;
}

/* Popup */
.lbd-sh-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.lbd-sh-modal.is-open {
    display: block;
}

.lbd-sh-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--lbd-sh-overlay, rgba(0, 0, 0, 0.62));
    backdrop-filter: blur(var(--lbd-sh-overlay-blur, 4px));
    -webkit-backdrop-filter: blur(var(--lbd-sh-overlay-blur, 4px));
}

.lbd-sh-dialog {
    position: relative;
    z-index: 2;
    width: var(--lbd-sh-popup-width, 460px);
    max-width: 100%;
    margin: 6vh auto;
    padding: 0;
    background-color: var(--lbd-sh-popup-bg, #ffffff);
    color: #1f2937;
    border-radius: var(--lbd-sh-popup-radius, 16px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    max-height: 88vh;
    height: var(--lbd-sh-popup-height, auto);
    display: flex;
    flex-direction: column;
}

.lbd-sh-head {
    padding: 26px 26px 0;
    flex: 0 0 auto;
}

/* Head rendered inside the popup body (login / reset views) */
.lbd-sh-body .lbd-sh-head {
    padding: 0 0 16px;
}

/* Popup views: login and lost-password live in the same dialog */
.lbd-sh-view {
    display: none;
}

.lbd-sh-view.is-active {
    display: block;
}

.lbd-sh-title {
    margin: 0 0 8px;
    padding-right: 40px;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--lbd-sh-title-color, #1f2937);
}

.lbd-sh-subtitle {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--lbd-sh-subtitle-color, #6b7280);
}

.lbd-sh-body {
    padding: 20px 26px 26px;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.lbd-sh-frame {
    display: block;
    width: 100%;
    height: 72vh;
    min-height: 320px;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
}

.lbd-sh-empty {
    margin: 0;
    padding: 24px;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

/* Fullscreen popup mode */
.lbd-sh-modal.is-fullscreen {
    padding: 0;
    overflow: hidden;
}

.lbd-sh-modal.is-fullscreen .lbd-sh-dialog {
    width: 100% !important;
    max-width: none;
    height: 100vh;
    max-height: none;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.lbd-sh-modal.is-fullscreen .lbd-sh-dialog {
    animation-name: lbdShFade;
}

.lbd-sh-modal.is-fullscreen .lbd-sh-body {
    flex: 1 1 auto;
    min-height: 0;
}

.lbd-sh-modal.is-fullscreen .lbd-sh-body.is-frame {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.lbd-sh-modal.is-fullscreen .lbd-sh-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 0;
}

/* Close button */
.lbd-sh-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: var(--lbd-sh-close-bg, rgba(0, 0, 0, 0.06));
    color: var(--lbd-sh-close-color, #111827);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lbd-sh-close:hover {
    background-color: rgba(0, 0, 0, 0.12);
    transform: rotate(90deg);
}

/* The login card should not add its own frame inside the popup */
.lbd-sh-body .lbd-login-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Built-in login form (standalone, works without the Login Form widget CSS) */
:is(.lbd-sh, .lbd-sh-modal) .lbd-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-input:focus {
    outline: none;
    border-color: #b08a56;
    box-shadow: 0 0 0 3px rgba(176, 138, 86, 0.18);
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-remember input {
    width: 16px;
    height: 16px;
    margin: 0;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #b08a56;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-btn:hover {
    background: #9a7648;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-links {
    display: flex;
    justify-content: center;
    font-size: 14px;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-link {
    color: #6b7280;
    text-decoration: underline;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-link:hover {
    color: #b08a56;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-msg {
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-msg.is-error,
:is(.lbd-sh, .lbd-sh-modal) .lbd-login-msg.is-success {
    display: block;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-msg.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

:is(.lbd-sh, .lbd-sh-modal) .lbd-login-msg.is-success {
    background: #ecfdf5;
    color: #047857;
}

/* Animations */
@keyframes lbdShFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lbdShZoom {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes lbdShSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lbdShSlideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.lbd-sh-modal.is-open .lbd-sh-overlay {
    animation: lbdShOverlayIn 0.22s ease both;
}

.lbd-sh-modal.is-open .lbd-sh-dialog {
    animation-duration: 0.32s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
}

.lbd-sh-modal[data-anim="fade"].is-open .lbd-sh-dialog {
    animation-name: lbdShFade;
}

.lbd-sh-modal[data-anim="zoom"].is-open .lbd-sh-dialog {
    animation-name: lbdShZoom;
}

.lbd-sh-modal[data-anim="slide-up"].is-open .lbd-sh-dialog {
    animation-name: lbdShSlideUp;
}

.lbd-sh-modal[data-anim="slide-down"].is-open .lbd-sh-dialog {
    animation-name: lbdShSlideDown;
}

/* Mobile */
@media (max-width: 640px) {
    .lbd-sh-modal {
        padding: 0;
    }

    .lbd-sh-dialog {
        width: 100% !important;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }

    .lbd-sh-body {
        padding: 18px 18px 28px;
    }

    .lbd-sh-head {
        padding: 24px 18px 0;
    }

    .lbd-sh-frame {
        height: 78vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lbd-sh-modal.is-open .lbd-sh-dialog,
    .lbd-sh-modal.is-open .lbd-sh-overlay {
        animation: none !important;
    }
}
