:root {
    --anptt-primary-color: #e94a4a;
    --anptt-primary-color-hover: #005177;
    --anptt-text-color: #ffffff;
    --anptt-border-radius: 8px;
    --anptt-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.anptt-dropdown {
    position: relative;
    display: inline-block;
}
.anptt-dropdown .anptt-dropdown-toggle {
    background: none;
    color: var(--anptt-primary-color);
    border: none;
    /* padding: 8px 12px; */
    cursor: pointer;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
}
.anptt-dropdown .anptt-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--anptt-border-radius);
    padding: 16px;
    z-index: 1000;
    min-width: 200px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.anptt-dropdown.anptt-dropdown--guest .anptt-dropdown-menu {
    min-width: 250px;
}

.anptt-dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.anptt-dropdown-menu li {
    margin-bottom: 10px;
}
.anptt-dropdown .anptt-dropdown-menu a,
.anptt-bottom-sheet__content a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    width: 100%;
}

.anptt-dropdown .anptt-dropdown-menu li:hover a,
.anptt-bottom-sheet__content li:hover a {
    color: var(--anptt-primary-color);
}

.anptt-dropdown.open .anptt-dropdown-menu {
    display: block;
}

.anptt-dropdown-user .anptt-user-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}
.anptt-dropdown-user .anptt-user-icon {
    display: inline-flex;
    align-items: center;
}
.anptt-username {
    font-weight: 600;
    color: var(--anptt-primary-color);
    font-size: 16px;
    font-family: inherit;
}

.anptt-login-extras {
    margin-top: 12px;
}

.anptt-login-extras a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    transition: color 0.3s ease;
}

.anptt-login-extras a:hover {
    color: var(--anptt-primary-color);
}

.anptt-dropdown-menu #loginform {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anptt-dropdown-menu #loginform p {
    margin: 0;
}

.anptt-dropdown-menu #loginform input[type="text"],
.anptt-dropdown-menu #loginform input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    height: auto;
}
.anptt-dropdown-menu #loginform input[type="submit"] {
    background-color: var(--anptt-primary-color);
    color: var(--anptt-text-color);
    border: none;
    padding: 10px;
    border-radius: var(--anptt-border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.3s;
    width: 100%;
    min-height: 40px;
}

.anptt-dropdown-menu #loginform input[type="checkbox"] {
    margin-right: 6px;
    transform: scale(1.2);
    vertical-align: middle;
}

.anptt-dropdown-menu #loginform input[type="checkbox"]:checked {
    accent-color: var(--anptt-primary-color);
}

@media (max-width: 768px) {
    .anptt-username {
        display: none;
    }

    /* Bottom sheet styles with slide-up animation */
    .anptt-bottom-sheet {
        position: fixed;
        inset: 0;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        z-index: 1100;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        transition: opacity 220ms ease;
    }
    .anptt-bottom-sheet--open {
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }
    .anptt-bottom-sheet__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        transition: opacity 220ms ease;
    }
    .anptt-bottom-sheet--open .anptt-bottom-sheet__backdrop {
        opacity: 1;
    }
    .anptt-bottom-sheet__panel {
        position: relative;
        width: 100%;
        max-width: 720px;
        background: #fff;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.2);
        transform: translateY(100%);
        transition: transform 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
        pointer-events: auto;
        overflow: auto;
        max-height: 90vh;
        will-change: transform;
    }
    .anptt-bottom-sheet--open .anptt-bottom-sheet__panel {
        transform: translateY(0);
    }
    .anptt-bottom-sheet__content {
        padding: 18px;
    }
    button.anptt-bottom-sheet__close {
        color: #666;
        position: absolute;
        right: 12px;
        top: 8px;
        background: transparent;
        border: none;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    /* When sheet open, prevent body scroll on mobile */
    body.anptt-bottom-sheet-open {
        overflow: hidden;
        touch-action: none;
    }

    /* Ensure moved panel looks good in sheet */
    .anptt-bottom-sheet__content .anptt-dropdown-menu,
    .anptt-bottom-sheet__content .anptt-dropdown-panel {
        position: static !important;
        top: auto !important;
        left: auto !important;
        border-radius: 8px;
        box-shadow: none;
        min-width: 0 !important;
        width: 100%;
        padding: 0;
        background: transparent;
    }

    /* Space the internal content appropriately */
    .anptt-bottom-sheet__content #loginform {
        padding: 0;
    }
}
