/* =========================================================
   Billardshop Header: Verkäufer-Button
   ========================================================= */

/*
 * Desktop-Button "Verkaufen".
 *
 * Sichtbarkeit wird im Thymeleaf-Template geregelt:
 * Nur CUSTOMER ohne SELLER/MODERATOR/ADMIN sehen diesen Button.
 */
.header-sell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 14px;
    border-radius: 999px;

    background: #111827;
    color: #ffffff;

    font-weight: 700;
    font-size: 14px;
    text-decoration: none;

    border: 1px solid #111827;

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

/*
 * Hover-Zustand für Desktop-Verkaufen-Button.
 */
.header-sell-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;

    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

/*
 * Mobile Variante des "Verkaufen"-Links im Burger-Menü.
 */
.mobile-sell-link {
    display: block;

    margin: 8px 0;
    padding: 10px 12px;

    border-radius: 10px;
    background: #111827;
    color: #ffffff !important;

    font-weight: 700;
    text-align: center;
    text-decoration: none;
}


/* =========================================================
   Billardshop: Seller-Info-Modal
   ========================================================= */



/* =========================================================
   Billardshop Header: Badge-Positionierung
   ========================================================= */

/*
 * Alle Header-Elemente, die ein kleines Badge tragen können,
 * brauchen position: relative.
 *
 * Beispiele:
 * - Merkliste-Icon
 * - Account-Icon
 * - Burger-Menü
 */
.wishlist-link,
.account-trigger-with-badge,
.menu-toggle-with-badge {
    position: relative;
}

/*
 * Kleine runde Badges direkt an Header-Icons.
 *
 * Wird verwendet für:
 * - .header-counter-badge  → Merkliste am Herz-Icon
 * - .account-header-badge  → Nachrichten am Männchen-Icon
 * - .burger-menu-badge     → Nachrichten am Burger-Menü
 */
.header-counter-badge,
.account-header-badge,
.burger-menu-badge {
    position: absolute;
    top: -7px;
    right: -8px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    border-radius: 999px;
    background: #111111;
    color: #ffffff;

    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;

    box-shadow: 0 0 0 2px #ffffff;
}

/*
 * Merkliste-Badge sitzt beim Herz minimal weiter rechts,
 * damit es optisch sauber auf dem Icon liegt.
 */
.header-counter-badge {
    right: -9px;
}


/* =========================================================
   Billardshop Header: Menü-Badges
   ========================================================= */

/*
 * Links mit Badge im Account-Dropdown und Mobile-Menü.
 *
 * Beispiele:
 * - Nachrichten  2
 * - Merkzettel   4
 */
.account-link-with-badge,
.mobile-nav-link-with-badge {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/*
 * Badges innerhalb von Menüs.
 *
 * Wird verwendet für:
 * - .account-menu-badge → Dropdown "Nachrichten"
 * - .mobile-nav-badge   → Mobile-Menü "Nachrichten" / "Merkzettel"
 */
.account-menu-badge,
.mobile-nav-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;

    border-radius: 999px;
    background: #111111;
    color: #ffffff;

    font-size: 12px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   Billardshop: Mobile Burger Menü Fix
   ========================================================= */

/*
 * Sicherheit:
 * Der Burger-Button soll auf Mobile klickbar und sichtbar sein.
 */
.menu-toggle {
    cursor: pointer;
    border: none;
    background: transparent;
    color: #111111;
}

/*
 * Sicherheit:
 * Mobile Menü ist standardmäßig geschlossen.
 */
.mobile-nav {
    display: none;
}

/*
 * Wenn JS .active setzt, muss das Menü sichtbar werden.
 *
 * Wichtig:
 * !important ist hier bewusst gesetzt, damit app-spezifisches CSS
 * mögliche Core-Regeln sicher übersteuert.
 */
.mobile-nav.active {
    display: flex !important;
    flex-direction: column;
    gap: 12px;

    position: fixed;
    top: 64px;
    left: 0;
    right: 0;

    z-index: 99999;

    padding: 16px;

    background: #ffffff;

    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;

    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

/*
 * Links im mobilen Menü.
 */
.mobile-nav.active a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 0;

    color: #111111;
    text-decoration: none;

    font-weight: 600;
}

/*
 * Mobile Suchform im Burger-Menü.
 */
.mobile-nav.active form {
    width: 100%;
}

/* =========================================================
   Billardshop Mobile Menü: Account-Bereich
   ========================================================= */

/*
 * Mobile Suchformular im Burger-Menü.
 */
.mobile-search-form {
    width: 100%;
    margin: 0 0 12px;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    font-size: 16px;
}

/*
 * Gruppen im mobilen Menü.
 */
.mobile-nav-section,
.mobile-account-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/*
 * Titel "Mein Konto" im mobilen Menü.
 */
.mobile-nav-section-title {
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 800;
    color: #111111;
}

/*
 * Anzeige des eingeloggten Users.
 */
.mobile-account-user {
    font-size: 13px;
    color: #777777;
    word-break: break-word;
    margin-bottom: 4px;
}

/*
 * Trennlinie zwischen Hauptnavigation und Account-Bereich.
 */
.mobile-nav-divider {
    height: 1px;
    background: #eeeeee;
    margin: 12px 0;
}

/*
 * Allgemeine Links im mobilen Menü.
 */
.mobile-nav a {
    color: #111111;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 0;
}

/*
 * Login-Button für Gäste und Logout-Button für eingeloggte User.
 */
.mobile-auth-primary,
.mobile-logout-btn {
    width: 100%;
    min-height: 44px;

    border: none;
    border-radius: 14px;

    background: #111111;
    color: #ffffff !important;

    font-weight: 800;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/*
 * Registrieren-Link für Gäste.
 */
.mobile-auth-secondary {
    text-align: center;
    text-decoration: underline !important;
    font-weight: 600;
}

/*
 * Logout-Form im mobilen Menü.
 */
.mobile-logout-form {
    margin: 12px 0 0;
}

/* =========================================================
   Billardshop Header: Nachrichten-Icon
   ========================================================= */

/*
 * Nachrichten-Link im Header.
 *
 * Wichtig:
 * - Ersetzt im Billardshop den Warenkorb-Platz.
 * - Braucht position: relative, damit der Badge am Icon sitzt.
 */
.chat-link {
    position: relative;
}

/*
 * Falls der Nachrichten-Counter am Chat-Icon optisch minimal anders sitzen soll.
 * Der Standard .header-counter-badge funktioniert bereits,
 * aber diese Regel hält es bei Chat sauber.
 */
.chat-link .header-counter-badge {
    top: -7px;
    right: -8px;
}