/* ===========================================
   PREMIUM NAVBAR (Single Row, Left to Right)
   Premium UI Design System
   Font: Figtree | 8pt Grid | Flat Design
   =========================================== */

/* ===========================================
   NAVBAR BASE
   =========================================== */
.nav,
.unified-navbar,
.lang-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 0 var(--space-5);
    height: 64px;
    background: var(--bg-surface);
    border-bottom: var(--border-thin) solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--font-family);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* ===========================================
   LOGO
   =========================================== */
.nav-logo,
.unified-logo,
.lang-nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    transition: opacity var(--duration-fast) var(--easing-base);
}

.nav-logo:hover,
.unified-logo:hover,
.lang-nav-logo:hover {
    opacity: 0.8;
}

.unified-logo-icon,
.lang-nav-logo-icon {
    font-size: 20px;
    line-height: 1;
}

.unified-brand-name,
.lang-nav-brand-name {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

/* ===========================================
   NAVIGATION LINKS
   =========================================== */
.nav-links,
.lang-nav-links,
.unified-nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.nav-link,
.lang-nav .lang-nav-link,
.lang-nav a.lang-nav-link,
.lang-nav button.lang-nav-link,
.unified-nav-link {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: 700;
    /*font-weight: var(--weight-regular);*/
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0;
    line-height: 64px;
    height: 64px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--duration-fast) var(--easing-base);
    white-space: nowrap;
    position: relative;
}

.nav-link:hover,
.lang-nav .lang-nav-link:hover,
.unified-nav-link:hover {
    color: var(--text-primary);
}

.nav-link.is-active,
.lang-nav .lang-nav-link.is-active,
.lang-nav .lang-nav-link.active,
.unified-nav-link.active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-link.is-active::after,
.lang-nav .lang-nav-link.is-active::after,
.lang-nav .lang-nav-link.active::after,
.unified-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.nav-link:focus-visible,
.unified-nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* Logout Link */
.lang-nav .lang-nav-link--logout {
    color: var(--text-muted);
}

.lang-nav .lang-nav-link--logout:hover {
    color: var(--text-primary);
}

/* Icon-only Links */
.lang-nav .lang-nav-link--icon {
    padding: 0 var(--space-2);
}

.lang-nav .lang-nav-link--icon svg {
    width: 18px;
    height: 18px;
}

/* Visibility States */
.lang-nav .lang-nav-link--visible svg {
    color: var(--success);
}

.lang-nav .lang-nav-link--hidden svg {
    color: var(--text-muted);
}

/* ===========================================
   NAVIGATION ACTIONS
   =========================================== */
.nav-actions,
.lang-nav-actions,
.unified-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Primary CTA Button */
.nav-cta {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    border: var(--border-thin) solid var(--accent);
    background: var(--accent);
    color: var(--neutral-0);
    text-decoration: none;
    transition:
        background var(--duration-fast) var(--easing-base),
        border-color var(--duration-fast) var(--easing-base);
}

.nav-cta:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Secondary Link */
.nav-secondary {
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-base);
}

.nav-secondary:hover {
    color: var(--text-primary);
}

/* Action Buttons */
.lang-nav .lang-nav-btn,
.lang-nav a.lang-nav-btn,
.lang-nav button.lang-nav-btn,
.unified-action-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 40px;
    padding: 0 var(--space-4);
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--easing-base);
}

.lang-nav .lang-nav-btn:hover,
.unified-action-item:hover {
    border-color: var(--text-muted);
}

/* Primary Action Button */
.lang-nav .lang-nav-btn.primary,
.unified-action-item.primary {
    background: var(--accent);
    color: var(--neutral-0);
    border-color: var(--accent);
}

.lang-nav .lang-nav-btn.primary:hover,
.unified-action-item.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Icon-only Action Button */
.lang-nav .lang-nav-btn--icon,
.unified-action-item.icon-only {
    width: 40px;
    padding: 0;
    justify-content: center;
    gap: 0;
}

/* Visibility Toggle Buttons */
.lang-nav .lang-nav-btn--visible {
    background: var(--success);
    border-color: var(--success);
    color: var(--neutral-0);
}

.lang-nav .lang-nav-btn--hidden {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: var(--neutral-0);
}

/* ===========================================
   DROPDOWN MENU
   =========================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
}

.nav-dropdown-trigger:hover {
    color: var(--text-primary);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-2);
    display: none;
    z-index: 100;
}

.nav-dropdown.is-active .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-item {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-family: var(--font-family);
    font-size: var(--text-body);
    font-weight: var(--weight-regular);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition:
        background var(--duration-fast) var(--easing-base),
        color var(--duration-fast) var(--easing-base);
}

.nav-dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

/* ===========================================
   MOBILE NAVIGATION
   =========================================== */
.nav-mobile-toggle {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: var(--border-thin);
    background: var(--text-primary);
    margin: var(--space-1) 0;
    transition: var(--duration-base) var(--easing-base);
}

/* ===========================================
   NAVIGATION VARIANTS
   =========================================== */
.nav-transparent {
    background: transparent;
    border-bottom-color: transparent;
}

.nav-transparent .nav-link {
    color: var(--neutral-0);
}

.nav-transparent .nav-link:hover {
    color: var(--neutral-0);
    opacity: 0.8;
}

.nav-transparent .nav-logo {
    color: var(--neutral-0);
}

.nav-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ===========================================
   BREADCRUMB NAVIGATION
   =========================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    list-style: none;
}

.breadcrumb-item {
    font-family: var(--font-family);
    font-size: var(--text-caption);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: var(--space-2);
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--easing-base);
}

.breadcrumb-link:hover {
    color: var(--text-primary);
}

.breadcrumb-item.is-active {
    color: var(--text-primary);
}

/* ===========================================
   TIMEZONE & TIME CONTROLS
   =========================================== */
.lang-nav-time {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.lang-nav-time-select {
    font-family: var(--font-family);
    font-size: var(--text-caption);
    color: var(--text-primary);
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0 var(--space-3);
    height: 40px;
    cursor: pointer;
}

.lang-nav-time-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

/* Override #sidebar button { width:100%; border:1px solid } from combined-all.css */
#sidebar .tz-clock-btn {
    width: 14px;
    max-width: 14px;
    height: 14px;
    min-width: 0;
    min-height: 0;
    flex: 0 0 14px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text-muted);
    align-self: center;
    line-height: 0;
}

.tz-clock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    max-width: 14px;
    height: 14px;
    min-width: 0;
    min-height: 0;
    flex: 0 0 14px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: var(--text-muted);
    align-self: center;
    line-height: 0;
    transition: color var(--duration-fast) var(--easing-base);
}

.tz-clock-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.tz-clock-btn.is-open {
    color: var(--accent);
}

.tz-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms var(--easing-base);
}

.tz-panel.is-open {
    max-height: 120px;
}

.tz-panel-inner {
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-top: var(--border-thin) solid var(--border-default);
    font-size: var(--text-caption);
}

.tz-panel-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.tz-panel-row:last-child {
    margin-bottom: 0;
}

.tz-panel-label {
    color: var(--text-muted);
    font-weight: var(--weight-semibold);
    min-width: 64px;
    flex-shrink: 0;
}

.tz-panel-value {
    color: var(--text-primary);
    font-weight: var(--weight-regular);
}

/* ===========================================
   CALENDAR WEEK NAVIGATION
   =========================================== */
.cal-week-nav {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

/* Legacy-Styling — wird umgangen wenn .button-standard-black gesetzt ist */
.cal-week-nav-btn:not(.button-standard-black) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: all var(--duration-fast) var(--easing-base);
}

.cal-week-nav-btn:not(.button-standard-black):hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
}

.cal-week-nav-btn:not(.button-standard-black):focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .nav,
    .unified-navbar,
    .lang-nav {
        padding: 0 var(--space-4);
        height: 56px;
    }

    .nav-links,
    .lang-nav-links,
    .unified-nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: block;
    }

    .nav.mobile-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: var(--border-thin) solid var(--border-default);
        padding: var(--space-4);
        gap: var(--space-3);
    }

    .nav-actions,
    .lang-nav-actions,
    .unified-nav-actions {
        gap: var(--space-2);
    }

    .lang-nav-time,
    .tz-clock-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav,
    .unified-navbar,
    .lang-nav {
        padding: 0 var(--space-3);
        gap: var(--space-2);
    }

    .unified-brand-name {
        display: none;
    }
}
