/* Hnojik User Badge - Header Account Icon */

/* Reset theme styles */
.site-top-bar .hvg-user-badge,
.site-top-bar li.hvg-user-badge-menu-item,
.site-top-bar .hvg-badge-trigger,
.site-top-bar-right .hvg-user-badge,
.site-top-bar-right li.hvg-user-badge-menu-item {
    box-shadow: none !important;
    border: none !important;
    background: none !important;
    float: none !important;
}

.hvg-user-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Trigger button */
.hvg-badge-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.hvg-badge-trigger:hover {
    background: #f3f4f6;
}

a.hvg-badge-trigger--link {
    color: #555;
    text-decoration: none;
}

a.hvg-badge-trigger--link:hover {
    color: #555;
    text-decoration: none;
}

/* Icon wrap — jednoduchý panáček */
.hvg-badge-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #777;
    font-size: 12px;
    flex-shrink: 0;
}

/* Discount tag — nenápadný štítek */
.hvg-badge-discount-tag {
    font-size: 10px;
    font-weight: 700;
    color: #4a7c59;
    background: #ecfdf5;
    padding: 1px 5px;
    border-radius: 8px;
    line-height: 1.3;
}

/* Badge info */
.hvg-badge-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.hvg-badge-tier-name {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    line-height: 1.2;
}

.hvg-badge-login-text {
    font-size: 13px;
    font-weight: 600;
}

.hvg-badge-arrow {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.2s;
}

/* Dropdown */
.hvg-badge-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    overflow: hidden;
}

.hvg-badge-dropdown--open {
    display: block;
}

/* Arrow rotation when open */
.hvg-badge-dropdown--open ~ .hvg-badge-trigger .hvg-badge-arrow,
.hvg-user-badge:has(.hvg-badge-dropdown--open) .hvg-badge-arrow {
    transform: rotate(180deg);
}

/* Dropdown header */
.hvg-badge-dropdown-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hvg-badge-user-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.hvg-badge-tier-label {
    font-size: 12px;
    color: var(--badge-color, #6b7280);
    font-weight: 600;
}

/* Dropdown nav */
.hvg-badge-dropdown-nav {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.hvg-badge-dropdown-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.hvg-badge-dropdown-nav a:hover {
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
}

.hvg-badge-dropdown-nav a i {
    width: 18px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.hvg-badge-dropdown-nav a:hover i {
    color: #6b7280;
}

.hvg-badge-logout {
    border-top: 1px solid #f3f4f6;
    margin-top: 2px;
    padding-top: 10px !important;
}

.hvg-badge-logout:hover {
    color: #dc2626 !important;
}

.hvg-badge-logout:hover i {
    color: #dc2626 !important;
}

/* Schovat WooCommerce My Account navigaci (nahrazena naším badge dropdown) */
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: none;
}

.woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
}

/* Menu item wrapper (when injected via wp_nav_menu_items) */
li.hvg-user-badge-menu-item {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

li.hvg-user-badge-menu-item a,
li.hvg-user-badge-menu-item button {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ===================== */
/* Stránka Můj profil    */
/* ===================== */

.hvg-account-page {
    max-width: 800px;
}

.hvg-account-greeting {
    font-size: 20px;
    margin-bottom: 20px;
    color: #111827;
}

.hvg-account-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.hvg-account-nav-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.hvg-account-nav-card:hover {
    border-color: #16a34a;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: #16a34a;
}

.hvg-account-nav-card i {
    font-size: 24px;
    color: #16a34a;
}

@media (max-width: 600px) {
    .hvg-account-nav {
        flex-direction: column;
    }

    .hvg-account-nav-card {
        flex-direction: row;
        padding: 14px 16px;
        gap: 12px;
    }

    .hvg-account-nav-card i {
        font-size: 20px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hvg-badge-info {
        display: none !important;
    }

    .hvg-badge-login-text {
        display: none !important;
    }

    .hvg-badge-arrow {
        display: none !important;
    }

    .hvg-badge-trigger {
        padding: 2px;
        gap: 0;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
        flex-direction: column;
        align-items: center;
    }

    .hvg-badge-trigger:hover {
        background: transparent !important;
    }

    .hvg-badge-icon-wrap {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .hvg-badge-discount-tag {
        font-size: 10px;
        padding: 1px 5px;
        margin-top: -2px;
    }

    .hvg-badge-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        min-width: 100%;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    .hvg-badge-dropdown-nav a {
        padding: 14px 20px;
        font-size: 16px;
    }

    .hvg-badge-dropdown-header {
        padding: 18px 20px 12px;
    }
}
