﻿:root {
    --blue-dark-color: #2c67a2;
    --blue-medium-color: #2480be;
    --red-button-color: #c25700;
    --kfx-customer-portal-accent: #265aa0;
    --kfx-customer-portal-accent-rgb: 38, 90, 160;
}

:root[data-theme='dark'] {
    --kfx-customer-portal-accent: #5aa9df;
    --kfx-customer-portal-accent-rgb: 90, 169, 223;
}

.navbar-standard {
    background-color: var(--blue-dark-color);
    border-bottom: solid 10px var(--blue-medium-color);
}

.navbar-standard-body {
    background-color: var(--blue-medium-color);
    margin-top: 5vw;
}

.icon-size {
    font-size: 2.0em;
}

.icon-ok {
    color: green;
}

.icon-error {
    color: red;
}

.table-font {
    font-size: 0.7em !important;
}

.tulipcolor {
    color: whitesmoke;
}


.navbar-nav .nav-link.active, .navbar-nav .nav-link.show {
    color: antiquewhite;
}

@media only screen and (max-width: 800px) {
    .logo-image {
        max-width: 25vw;
    }
}

/* ========================================
   PHASE 1: Enhanced Navigation Visibility
   ======================================== */

/* Stable portal chrome: venue branding is an accent, not a page-mode background. */
.customer-menu-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kfx-spacing-md);
    padding: 0.75rem clamp(0.75rem, 2vw, 1.25rem);
    color: var(--kfx-color-text-primary);
    background-color: var(--kfx-color-bg-surface) !important;
    border-bottom: 3px solid var(--kfx-customer-portal-accent);
    box-shadow: 0 2px 4px var(--kfx-color-shadow-light);
}

.customer-menu-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(var(--kfx-customer-portal-accent-rgb), 0.06), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.customer-menu-header > * {
    position: relative;
    z-index: 1;
}

.customer-menu-brand,
.customer-menu-utilities,
.customer-brand-link {
    display: flex;
    align-items: center;
}

.customer-menu-brand,
.customer-brand-link {
    gap: 0.625rem;
}

.customer-brand-link {
    color: var(--kfx-color-text-primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.customer-brand-link:hover,
.customer-brand-link:focus-visible {
    color: var(--kfx-customer-portal-accent) !important;
    text-decoration: none;
}

.customer-brand-link .logo-image {
    width: 50px;
}

.customer-portal-title {
    color: var(--kfx-color-text-primary) !important;
}

.customer-brand-link:hover .customer-portal-title,
.customer-brand-link:focus-visible .customer-portal-title {
    color: var(--kfx-customer-portal-accent) !important;
}

.customer-menu-utilities {
    gap: 0.625rem;
}

.customer-user-name {
    max-width: 16rem;
    overflow: hidden;
    color: var(--kfx-color-text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-logout-form {
    margin: 0;
}

.customer-mobile-menu-button,
.customer-menu-header .customer-utility-button {
    color: var(--kfx-color-text-primary) !important;
    background: var(--kfx-color-bg-surface-raised) !important;
    border-color: var(--kfx-color-border-default) !important;
}

.customer-mobile-menu-button:hover,
.customer-menu-header .customer-utility-button:hover {
    color: var(--kfx-customer-portal-accent) !important;
    border-color: var(--kfx-customer-portal-accent) !important;
}

/* Enhanced existing RadzenButtons in menu */
.menu-items .rz-button-text-light {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.2s ease !important;
    min-height: 44px; /* WCAG accessibility */
    padding: 0.5rem 1rem !important;
}

.menu-items .rz-button-text-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Enhanced mobile menu button */
.d-md-none .rz-button[data-icon="menu"] {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    min-height: 48px; /* Larger for mobile touch */
    min-width: 48px;
}

/* ========================================
   PHASE 2: Bootstrap Button Styling
   ======================================== */

/* Customer navigation buttons */
.customer-nav-btn {
    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kfx-spacing-sm);

    /* Sizing */
    min-height: 44px; /* WCAG touch target */
    padding: var(--kfx-spacing-sm) var(--kfx-spacing-md);

    /* Colors */
    color: var(--kfx-customer-portal-accent) !important;
    background-color: var(--kfx-color-bg-surface-raised);
    border: 1px solid var(--kfx-color-border-default);
    border-radius: var(--kfx-radius-full);

    /* Effects */
    box-shadow: 0 2px 4px var(--kfx-color-shadow-light);
    transition: all 0.2s ease-in-out;

    /* Typography */
    font-weight: 500;
    text-decoration: none;
}

.customer-nav-btn i {
    line-height: 1;
    font-size: 1.25rem;
}

.customer-nav-btn span {
    line-height: 1;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-nav-btn:hover {
    color: var(--kfx-customer-portal-accent) !important;
    background-color: rgba(var(--kfx-customer-portal-accent-rgb), 0.1);
    border-color: var(--kfx-customer-portal-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--kfx-color-shadow-medium);
    text-decoration: none;
}

.customer-nav-btn:active {
    color: var(--kfx-customer-portal-accent) !important;
    transform: scale(0.98);
}

/* Focus indicators for keyboard navigation */
.customer-nav-btn:focus-visible {
    color: var(--kfx-customer-portal-accent) !important;
    outline: 2px solid var(--kfx-customer-portal-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.25rem rgba(var(--kfx-customer-portal-accent-rgb), 0.2);
}

/* The global dark-link rule must not recolor portal chrome based on link history. */
:root[data-theme='dark'] a.customer-brand-link,
:root[data-theme='dark'] a.customer-brand-link:visited {
    color: var(--kfx-color-text-primary) !important;
}

:root[data-theme='dark'] a.customer-brand-link:hover,
:root[data-theme='dark'] a.customer-brand-link:focus-visible,
:root[data-theme='dark'] a.customer-nav-btn,
:root[data-theme='dark'] a.customer-nav-btn:visited,
:root[data-theme='dark'] a.customer-nav-btn:hover,
:root[data-theme='dark'] a.customer-nav-btn:focus-visible {
    color: var(--kfx-customer-portal-accent) !important;
}

@media (max-width: 767.98px) {
    .customer-portal-title,
    .customer-user-name {
        display: none !important;
    }

    .customer-menu-header {
        gap: var(--kfx-spacing-sm);
    }

    .customer-menu-utilities {
        gap: var(--kfx-spacing-xs);
    }
}

/* Icon-only on tablets (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .customer-nav-btn {
        min-width: 44px;
        padding: var(--kfx-spacing-sm) 0.75rem;
    }
}

/* Touch device optimizations - disable hover transform */
@media (hover: none) {
    .customer-nav-btn:hover {
        transform: none;
    }
}

/* ========================================
   PHASE 3: Enhanced Tab Navigation
   ======================================== */

.project-tabs-card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.project-tabs-card .rz-tabview-nav {
    background: var(--kfx-color-bg-surface);
    padding: 1rem;
    border-bottom: 2px solid var(--kfx-color-border-default);
    gap: 0.5rem;
}

.project-tabs-card .rz-tabview-nav li a {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-tabs-card .rz-tabview-nav li a:hover {
    background: rgba(var(--kfx-customer-portal-accent-rgb), 0.08);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-tabs-card .rz-tabview-nav li.rz-tabview-selected {
    border-bottom-color: var(--kfx-customer-portal-accent) !important;
}

.project-tabs-card .rz-tabview-nav li.rz-tabview-selected a {
    color: var(--kfx-customer-portal-accent) !important;
    background: rgba(var(--kfx-customer-portal-accent-rgb), 0.08) !important;
    box-shadow: none;
    font-weight: 600;
}

.project-tabs-card .rz-tabview-nav li a .rz-tabview-title,
.project-tabs-card .rz-tabview-nav li a .rz-tabview-icon {
    color: var(--kfx-color-text-secondary) !important;
}

.project-tabs-card .rz-tabview-nav li.rz-tabview-selected a .rz-tabview-title,
.project-tabs-card .rz-tabview-nav li.rz-tabview-selected a .rz-tabview-icon {
    color: var(--kfx-customer-portal-accent) !important;
}

.project-tabs-card .rz-tabview-nav li a:focus-visible {
    outline: 2px solid var(--kfx-customer-portal-accent);
    outline-offset: 2px;
}

/* Dark mode support */
:root[data-theme='dark'] .project-tabs-card .rz-tabview-nav {
    background: var(--kfx-color-bg-surface-secondary);
}
