@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@400;500;600&display=swap');

/* =============================================================================
   THEME TOKENS (juster her for at ændre udseende globalt)
   ============================================================================= */
:root {
    /* Colors */
    --gold: #b99a68;
    --gold-strong: #d4af37;
    --accent: #8b6f47;
    --bg: #3b2f2f;
    --surface: #2c2424;
    --bg-darker: #1f1a1a;
    --text: #f5e9dc;
    --muted: #bbb;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    
    /* Shadows & Effects */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --gold-glow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    --search-close-filter: invert(1) grayscale(1);
    
    /* Layout */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-pill: 999px;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    
    /* Buttons */
    --btn-height: 2.1rem;
    --btn-height-sm: 1.8rem;
    --btn-height-lg: 2.5rem;
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    height: 100%;
    margin: 0;
    padding-top: 20px;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =============================================================================
   LINKS
   ============================================================================= */
a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* =============================================================================
   HEADINGS
   ============================================================================= */
h1, h2, h3, h4, h5, h6,
.container h2 {
    color: var(--gold);
    font-weight: bold;
    font-family: var(--font-heading);
}

/* =============================================================================
   NAVBAR
   ============================================================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--surface);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: var(--text);
    font-weight: bold;
}

.navbar a:hover {
    color: var(--gold);
}

/* Mobile navbar - sikrer at dropdown kan vises */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        max-height: none;
        overflow: visible;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item {
        color: #f8f9fa;
        padding: 0.5rem 1rem;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background-color: rgba(212, 175, 55, 0.2);
    }
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 0.75rem;
    margin-left: 0.75rem;
}

.language-switcher .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.35rem;
    border-radius: var(--radius-pill);
    background: transparent;
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.language-switcher .small {
    color: var(--gold-strong);
}

/* =============================================================================
   BUTTONS - UNIFIED SYSTEM
   One style per button type. No duplicates.
   ============================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    min-height: var(--btn-height);
    height: auto;
    padding: 0 0.75rem;
    font-size: 1rem;
    line-height: 1.1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

.btn-sm {
    min-height: var(--btn-height-sm);
    padding: 0 0.55rem;
    font-size: 0.875rem;
}

.btn-lg,
.wk-btn-lg {
    min-height: var(--btn-height-lg);
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
}

/* Primary Button (Gold solid) */
.btn-primary,
.btn-wk-primary,
.btn-gold {
    background-color: var(--gold-strong);
    color: var(--surface);
    border: 1px solid var(--gold-strong);
}

.btn-primary:hover,
.btn-wk-primary:hover,
.btn-gold:hover {
    background-color: #b8941f;
    color: #1f1a1a;
    border-color: var(--gold-strong);
}

.btn-primary:focus,
.btn-wk-primary:focus,
.btn-gold:focus {
    box-shadow: var(--gold-glow);
}

/* Secondary Button (Surface with gold border) */
.btn-secondary,
.btn-wk-secondary {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--gold);
}

.btn-secondary:hover,
.btn-wk-secondary:hover {
    background-color: var(--bg-darker);
    color: var(--gold);
}

/* Outline Gold Button */
.btn-outline-gold,
.btn-ghost,
.btn-wk-ghost {
    color: var(--gold-strong);
    border: 1px solid var(--gold-strong);
    background-color: transparent;
}

.btn-outline-gold:hover,
.btn-ghost:hover,
.btn-wk-ghost:hover {
    background-color: var(--gold-strong);
    color: #000;
    border-color: var(--gold-strong);
}

/* Outline Secondary */
.btn-outline-secondary {
    color: var(--text);
    border: 1px solid var(--gold);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gold);
    color: var(--surface);
}

/* DELETE Button (Danger) */
.btn-danger,
.btn-outline-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-danger:hover,
.btn-outline-danger:hover {
    background-color: var(--danger);
    color: white;
}

/* Success Button */
.btn-success,
.btn-outline-success {
    border: 1px solid var(--success);
    color: var(--success);
    background: transparent;
}

.btn-success:hover,
.btn-outline-success:hover {
    background-color: var(--success);
    color: white;
}

/* Warning Button */
.btn-warning,
.btn-outline-warning {
    border: 1px solid var(--warning);
    color: var(--warning);
    background: transparent;
}

.btn-warning:hover,
.btn-outline-warning:hover {
    background-color: var(--warning);
    color: #000;
}

/* Button Groups */
.btn-group {
    gap: 0.35rem;
}

.btn-group .btn {
    margin: 0;
}

/* =============================================================================
   CARDS - UNIFIED SYSTEM
   ============================================================================= */
.card {
    background-color: var(--surface);
    border: 1px solid var(--gold);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--gold);
    transition: background-color 0.2s ease;
}

.card-header:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.card-title {
    font-size: 1.3rem;
    color: var(--gold);
}

.card-text {
    font-size: 1rem;
}

.card-img-top {
    border-bottom: 2px solid var(--gold-strong);
}

/* Card overflow for dropdowns/autocomplete */
.wk-card-overflow {
    overflow: visible;
    position: relative;
    z-index: 100;
}

.wk-card-overflow .card-body {
    overflow: visible;
}

/* =============================================================================
   FORMS - UNIFIED SYSTEM
   ============================================================================= */

/* Form Controls */
.form-control {
    background-color: var(--bg-darker);
    border: 1px solid var(--gold);
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.form-control:focus {
    background-color: var(--bg-darker);
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
    color: white;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gold-strong);
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.password-toggle:hover {
    background-color: rgba(212, 175, 55, 0.12);
    color: var(--text);
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: var(--gold-glow);
}

.password-toggle__icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
}

.password-toggle__icon svg {
    width: 100%;
    height: 100%;
}

.password-toggle__icon--hide {
    display: none;
}

.password-toggle.is-visible .password-toggle__icon--show {
    display: none;
}

.password-toggle.is-visible .password-toggle__icon--hide {
    display: inline-flex;
}

/* Form Select (dropdown) - Unified styling for all selects */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #1a1a1a;
    border: 1px solid var(--gold);
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23d4af37' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}

.form-select:focus {
    background-color: #1a1a1a;
    border-color: var(--gold-strong);
    box-shadow: var(--gold-glow);
    color: white;
    outline: none;
}

.form-select option {
    background-color: #1a1a1a;
    color: white;
    padding: 10px 12px;
}

.form-select option:hover,
.form-select option:checked {
    background-color: rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

/* Small select variant */
.form-select-sm {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Checkboxes & Radios */
.form-check-input {
    background-color: var(--bg-darker);
    border: 1px solid var(--gold);
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-check-input:focus {
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
}

/* Number inputs - remove spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Date inputs - fix dark calendar icon */
input[type="date"].date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Textarea styling */
textarea.form-control {
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.5;
}

textarea.form-control::-webkit-scrollbar {
    width: 10px;
}

textarea.form-control::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

textarea.form-control::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}

textarea.form-control::-webkit-scrollbar-thumb:hover {
    background: var(--gold-strong);
}

/* Dark select utility */
.wk-select-dark {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #0d0d0d;
    background-image: none;
}

.wk-input-dark {
    background-color: #0d0d0d;
    color: white;
    padding: 0.25rem 0.5rem;
}

/* =============================================================================
   POPUP & TOOLTIP - MAP
   ============================================================================= */
.popup-container,
.tooltip-container {
    background-color: var(--surface);
    color: var(--text);
    border: 2px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
}

.popup-container {
    max-width: 300px;
    position: relative;
}

.tooltip-container {
    position: absolute;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -100%);
    font-size: 14px;
    z-index: 1000;
}

.popup-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--gold);
    color: #918e8e;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.popup-close-btn:hover {
    background-color: var(--accent);
    color: var(--text);
}

.popup-link {
    color: var(--gold);
}

.popup-link:hover {
    color: var(--text);
    text-decoration: underline;
}

/* =============================================================================
   DROPDOWNS - UNIFIED SYSTEM
   ============================================================================= */
.dropdown-menu {
    background-color: #212529;
    color: #f8f9fa;
    border: 1px solid var(--gold-strong);
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
}

/* Admin dropdown med submenus - overflow må ikke klippe */
.dropdown-menu:has(.dropdown-submenu) {
    overflow: visible;
    max-height: none;
}

.dropdown-item {
    color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.dropdown-menu label {
    display: block;
    color: #f8f9fa;
    margin-bottom: 8px;
    cursor: pointer;
}

.dropdown-menu input[type="checkbox"] {
    margin-right: 6px;
}

/* Filter Dropdown (distillery page etc.) */
.filter-dropdown {
    background: #1a1a1a;
    border: 2px solid var(--gold);
    min-width: 250px;
    max-width: 90vw;
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem !important;
}

.filter-dropdown .form-check {
    padding: 0.35rem 0.5rem 0.35rem 1.75rem;
    margin-bottom: 0.15rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.filter-dropdown .form-check:hover {
    background: rgba(212, 175, 55, 0.1);
}

.filter-dropdown::-webkit-scrollbar {
    width: 8px;
}

.filter-dropdown::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.filter-dropdown::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: var(--radius-sm);
}

/* Dropdown Submenu (nested dropdowns in admin menu) */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    display: none;
}

.dropdown-submenu .dropdown-menu.show {
    display: block;
    z-index: 1050;
}

/* Desktop: submenu åbner til siden */
@media (min-width: 992px) {
    .dropdown-submenu .dropdown-menu {
        position: absolute;
        left: 100%;
        top: 0;
        margin-top: -1px;
        margin-left: 2px;
    }
    
    .dropdown-menu-end .dropdown-submenu .dropdown-menu {
        left: auto;
        right: 100%;
        margin-left: 0;
        margin-right: 2px;
    }
    
    .dropdown-submenu .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.5em;
        vertical-align: 0.1em;
        content: "▶";
        font-size: 0.65em;
        border: none;
    }
    
    .dropdown-menu-end .dropdown-submenu .dropdown-toggle::after {
        content: "◀";
    }
}

/* Mobile: submenu åbner som indented liste */
@media (max-width: 991.98px) {
    .dropdown-submenu .dropdown-menu {
        position: static !important;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        margin: 0.25rem 0;
        min-width: auto;
        max-height: none;
        overflow: visible;
    }
    
    .dropdown-submenu .dropdown-menu .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        color: #f8f9fa;
    }
    
    .dropdown-submenu .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.5em;
        content: "▼";
        font-size: 0.65em;
        border: none;
        transition: transform 0.2s ease;
    }
    
    .dropdown-submenu .dropdown-toggle.open::after {
        transform: rotate(180deg);
    }
}

/* =============================================================================
   AUTOCOMPLETE - UNIFIED SYSTEM
   ============================================================================= */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    max-height: 300px;
    overflow-y: auto;
    z-index: 3000;
    margin-top: 4px;
    display: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    background: transparent;
    color: #fff;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    font: inherit;
}

.autocomplete-item:hover,
.autocomplete-item:active {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}

.autocomplete-item:not(:last-child) {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.autocomplete-item.autocomplete-create {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    font-style: italic;
    border-top: 2px solid var(--gold);
}

.autocomplete-item.autocomplete-create:hover {
    background: rgba(212, 175, 55, 0.22);
    color: var(--gold-strong);
}

.autocomplete-item.autocomplete-no-results {
    color: #888;
    cursor: default;
    pointer-events: none;
}

/* Autocomplete Scrollbar */
.autocomplete-results::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-results::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: var(--radius);
}

.autocomplete-results::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: var(--radius);
}

.autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: var(--gold-strong);
}

/* =============================================================================
   TABLES - UNIFIED SYSTEM
   ============================================================================= */
.table {
    color: var(--text);
}

.table thead th {
    border-bottom: 2px solid var(--gold-strong);
    padding: 0.75rem;
    color: var(--gold);
}

.table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

/* Tables generated from Markdown in distillery resumes */
.resume-markdown {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.resume-markdown table {
    width: 100%;
    min-width: 760px;
    margin: 1rem 0 1.5rem;
    color: var(--text);
    background-color: var(--surface);
    border-collapse: collapse;
}

.resume-markdown th,
.resume-markdown td {
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(212, 175, 55, 0.22);
    text-align: left;
    vertical-align: top;
}

.resume-markdown th {
    color: var(--gold-strong);
    background-color: rgba(212, 175, 55, 0.12);
    white-space: nowrap;
}

.resume-markdown tbody tr:nth-child(even) {
    background-color: rgba(212, 175, 55, 0.05);
}

/* Sort icons */
.sortable .sort-icon {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.75em;
    color: var(--gold);
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sortable.asc .sort-icon {
    transform: rotate(0deg);
    opacity: 0.9;
}

.sortable.desc .sort-icon {
    transform: rotate(180deg);
    opacity: 0.9;
}

.wk-th-40 {
    width: 40%;
}

/* =============================================================================
   BADGES - UNIFIED SYSTEM
   ============================================================================= */
.badge {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
}

.badge.bg-gold {
    background-color: var(--gold-strong);
    color: #111;
    font-weight: 700;
}

.badge.bg-secondary {
    background-color: #2c2c2c;
    color: #f8f9fa;
}

/* =============================================================================
   PAGINATION - UNIFIED SYSTEM
   ============================================================================= */
.pagination {
    gap: 0.25rem;
}

.page-item .page-link {
    background-color: var(--surface);
    border-color: var(--gold);
    color: var(--gold);
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background-color: var(--gold);
    color: var(--surface);
}

.page-item.active .page-link {
    background-color: var(--gold-strong);
    border-color: var(--gold-strong);
    color: #000;
}

.pagination-bar {
    background: #0f0f0f;
    border: 1px solid var(--gold);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.75rem;
}

/* =============================================================================
   LIST GROUPS - UNIFIED SYSTEM
   ============================================================================= */
.list-group-item {
    background-color: var(--bg-darker);
    border-color: rgba(212, 175, 55, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    transform: translateX(4px);
}

.list-group-item strong {
    color: var(--gold);
    font-weight: 600;
}

.list-group-item h6 {
    color: var(--text);
    margin-bottom: 0.25rem;
}

.list-group-item-action {
    color: var(--text);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    color: var(--text);
    background-color: rgba(212, 175, 55, 0.15);
}

/* Search Results List */
#search-results .list-group-item {
    cursor: pointer;
}

.wk-search-results {
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
}

/* =============================================================================
   ALERTS - UNIFIED SYSTEM
   ============================================================================= */
.alert {
    border-radius: var(--radius);
    border: 1px solid;
}

#alert-box {
    background: rgba(220, 53, 69, 0.15);
    color: #f8d7da;
    border-color: var(--danger);
}

/* =============================================================================
   MODALS - UNIFIED SYSTEM
   ============================================================================= */
.modal-content {
    background-color: var(--surface);
    border: 1px solid var(--gold);
    color: var(--text);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom-color: var(--gold);
}

.modal-footer {
    border-top-color: var(--gold);
}

.modal-body .border:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* =============================================================================
   BACKGROUNDS - UNIFIED SYSTEM
   ============================================================================= */
.bg-darker {
    background-color: rgba(0, 0, 0, 0.3);
}

.bg-gold {
    background-color: var(--gold-strong);
}

.bg-surface {
    background-color: var(--surface);
}

/* =============================================================================
   BORDERS - UNIFIED SYSTEM
   ============================================================================= */
.border-gold {
    border-color: var(--gold-strong) !important;
}

/* =============================================================================
   MAP COMPONENTS
   ============================================================================= */
.map-container,
#map {
    border: 4px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#map {
    width: 100%;
    flex: 1;
}

/* Legend */
#legend {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 2px solid var(--gold);
    padding: 1rem;
    z-index: 1050;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    visibility: hidden;
    opacity: 0;
}

#legend.show {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
}

/* Status Filters */
#status-filters {
    display: flex;
    gap: 1rem;
}

.status-filter-item {
    transition: opacity 0.3s ease, transform 0.2s ease;
    text-align: center;
    padding: 5px;
    border-radius: var(--radius);
}

.status-filter-item:hover {
    transform: scale(1.1);
    background-color: rgba(212, 175, 55, 0.1);
}

.status-filter-item.active {
    opacity: 1.0;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
    background-color: rgba(212, 175, 55, 0.15);
}

.status-label {
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
}

.status-filter-item.active .status-label {
    color: var(--gold);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Release badge in map popup */
.wk-release-badge {
    background: var(--gold-strong);
    color: white;
    padding: 8px;
    margin: 10px 0;
    border-radius: 5px;
}

.wk-release-badge a {
    color: white;
    text-decoration: underline;
}

/* =============================================================================
   NEARBY PANEL (mobile)
   ============================================================================= */
.nearby-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    color: var(--text);
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-top: 2px solid var(--gold);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateY(100%);
    transition: transform 0.3s ease, background 0.2s;
}

.nearby-panel.show {
    transform: translateY(0);
}

.nearby-panel h5,
.nearby-panel h6 {
    color: var(--gold);
}

.nearby-panel .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.nearby-panel .list-group-item {
    background-color: var(--bg-darker);
    color: var(--text);
    border-color: rgba(212, 175, 55, 0.3);
}

.nearby-panel .list-group-item:hover {
    background-color: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
}

.nearby-list {
    padding: 1.7rem 0.7rem 0.7rem 0.7rem;
}

/* =============================================================================
   WHISKY ITEMS (collection cards)
   ============================================================================= */
.whisky-item {
    border-width: 2px;
    transition: all 0.2s ease;
}

.whisky-item:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.whisky-item .card-header {
    transition: background-color 0.2s ease;
}

.whisky-item .card-header:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.whisky-details {
    display: grid;
    gap: 0.5rem;
}

.whisky-image {
    transition: transform 0.3s ease;
}

.whisky-image:hover {
    transform: scale(1.05);
}

/* =============================================================================
   DISTILLERY CARDS
   ============================================================================= */
.distillery-card {
    border-width: 2px;
    transition: all 0.2s ease;
}

.distillery-card:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.card-details {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.card-details.open {
    transition: max-height 0.3s ease-in;
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--gold);
}

/* =============================================================================
   RATING PAGE
   ============================================================================= */
.rating-page .card {
    background-color: #0f0f0f;
    border-color: var(--gold);
}

.rating-page .card-header {
    background-color: #111;
}

.rating-view .card {
    background-color: #0f0f0f;
    border-color: var(--gold);
}

.rating-view .card-header {
    background-color: #111;
}

.quick-result-text {
    color: var(--text) !important;
    opacity: 0.92;
}

.quick-result-score {
    min-width: 4.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    -webkit-text-fill-color: currentColor !important;
}

.quick-result-score.quick-score-has-value {
    color: #1f1a1a !important;
    -webkit-text-fill-color: #1f1a1a !important;
}

.quick-result-score.quick-score-empty {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
}

.quick-score-row {
    display: block;
}

.quick-score-row .form-range {
    width: 100%;
    margin: 0;
}

/* =============================================================================
   EASYMDE EDITOR (dark theme)
   ============================================================================= */
.EasyMDEContainer {
    background: #1a1a1a;
}

.EasyMDEContainer .CodeMirror {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid var(--gold);
    border-radius: var(--radius-sm);
}

.EasyMDEContainer .editor-toolbar {
    background: #2d2d2d;
    border: 1px solid var(--gold);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.EasyMDEContainer .editor-toolbar button {
    color: #fff;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
    background: var(--gold);
    border-color: var(--gold);
}

.EasyMDEContainer .editor-preview {
    background: #1a1a1a;
    color: #fff;
}

.EasyMDEContainer .CodeMirror-cursor {
    border-left-color: var(--gold);
}

/* =============================================================================
   QUILL EDITOR (dark theme)
   ============================================================================= */
#editor .ql-toolbar {
    background: #2d2d2d;
    border-color: var(--gold-strong);
    border-radius: var(--radius) var(--radius) 0 0;
}

#editor .ql-container {
    border-color: var(--gold-strong);
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 1rem;
}

#editor .ql-editor {
    min-height: 300px;
    color: #fff;
}

#editor .ql-editor.ql-blank::before {
    color: #888;
    font-style: italic;
}

#editor .ql-toolbar .ql-stroke {
    stroke: #ccc;
}

#editor .ql-toolbar .ql-fill {
    fill: #ccc;
}

#editor .ql-toolbar .ql-picker {
    color: #ccc;
}

#editor .ql-toolbar button:hover .ql-stroke,
#editor .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--gold-strong);
}

#editor .ql-toolbar button:hover .ql-fill,
#editor .ql-toolbar button.ql-active .ql-fill {
    fill: var(--gold-strong);
}

/* =============================================================================
   MAIL COMPOSE
   ============================================================================= */
.selected-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid var(--gold-strong);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
}

.selected-user-badge .remove-user {
    cursor: pointer;
    opacity: 0.7;
}

.selected-user-badge .remove-user:hover {
    opacity: 1;
}

#searchResults .dropdown-item {
    color: #fff;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#searchResults .dropdown-item:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* =============================================================================
   SELECT2 (if used)
   ============================================================================= */
.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--bg-darker);
    border: 1px solid var(--gold);
    color: var(--text);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--text);
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
}

.select2-dropdown {
    background-color: #212529;
    border: 1px solid var(--gold);
}

.select2-results__option {
    color: #f8f9fa;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--gold);
    color: #000;
}

/* =============================================================================
   ABOUT PAGE
   ============================================================================= */
.wk-logo {
    max-width: 280px;
    height: auto;
}

@media (max-width: 576px) {
    .wk-logo {
        max-width: 200px;
    }
}

/* =============================================================================
   INDEX PAGE - SHORTCUT & STAT CARDS
   ============================================================================= */
.shortcut-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid #3d3d3d;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 180px;
}

.shortcut-card:hover:not(.disabled) {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
    text-decoration: none;
}

.shortcut-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.shortcut-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.shortcut-icon-img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
}

.shortcut-title {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.shortcut-description {
    color: #aaa;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Stat cards */
.stat-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 2px solid #3d3d3d;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #aaa;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alert info styling */
.alert-info {
    background: linear-gradient(135deg, #1a4d6d 0%, #0d2638 100%);
    border-color: #2d6d8f;
    color: #fff;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Layout containers */
.wk-layout-800 { max-width: 800px; margin: 0 auto; }
.wk-layout-1000 { max-width: 1000px; margin: 0 auto; }
.wk-layout-1200 { max-width: 1200px; margin: 0 auto; }
.wk-layout-1400 { max-width: 1400px; margin: 0 auto; }
.wk-container-wide { width: 100%; max-width: 1800px; margin-inline: auto; }

/* Width utilities */
.wk-max-w-120 { max-width: 120px; }
.wk-max-w-200 { max-width: 200px; }
.wk-max-w-300 { max-width: 300px; }
.wk-max-w-600 { max-width: 600px; }
.wk-min-w-200 { min-width: 200px; }

/* Height utilities */
.wk-max-h-120 { max-height: 120px; }
.wk-max-h-200 { max-height: 200px; }
.wk-max-h-220 { max-height: 220px; }
.wk-max-h-250 { max-height: 250px; }
.wk-max-h-280 { max-height: 280px; }
.wk-max-h-300 { max-height: 300px; }
.wk-max-h-350 { max-height: 350px; }
.wk-max-h-400 { max-height: 400px; }
.wk-max-h-500 { max-height: 500px; }
.wk-min-h-100 { min-height: 100px; }
.wk-min-h-150 { min-height: 150px; }
.wk-h-24 { height: 24px; }
.wk-h-500 { height: 500px; }
.wk-square-120 { width: 120px; height: 120px; }

/* Icon sizes */
.wk-icon-20 { width: 20px; height: 20px; }
.wk-icon-30 { width: 30px; height: 30px; }
.wk-icon-60 { width: 60px; height: 60px; }
.wk-icon-80 { width: 80px; height: 80px; }

/* Image utilities */
.wk-img-cover { width: 100%; object-fit: cover; }
.wk-img-contain { width: 100%; object-fit: contain; }
.wk-resize-vertical { resize: vertical; }

/* Positioning & z-index */
.wk-pointer { cursor: pointer; }
.wk-prewrap { white-space: pre-wrap; }
.wk-hidden { display: none; }
.wk-z-1000 { z-index: 1000; }
.wk-z-2000 { z-index: 2000; }
.wk-sticky-70 { position: sticky; top: 70px; z-index: 100; }
.wk-abs-br { position: absolute; right: 20px; bottom: 20px; z-index: 1000; }

/* Flash container */
.flash-container { z-index: 2000; max-width: 600px; }

/* Progress bars */
.wk-progress-4 { height: 4px; }
.wk-progress-8 { height: 8px; }

/* Monospace (opening hours etc.) */
.wk-monospace {
    font-family: Consolas, 'Courier New', monospace;
    white-space: pre;
}

/* Image sizes */
.wk-img-thumb-80 {
    height: 80px;
    width: 80px;
    object-fit: cover;
}

.wk-img-thumb-60 {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.wk-img-thumb-200 {
    max-height: 200px;
    object-fit: contain;
}

.wk-img-thumb-300 {
    max-height: 300px;
    object-fit: contain;
}

.wk-img-release {
    height: 200px;
    object-fit: cover;
}

.wk-img-preview {
    max-height: 300px;
    object-fit: contain;
}

.wk-img-view {
    max-height: 500px;
    object-fit: contain;
    background: #1a1a1a;
    padding: 20px;
}

/* Bootstrap img-thumbnail override for dark theme */
.img-thumbnail {
    background-color: var(--bg-darker);
    border-color: var(--gold);
}

/* Carousel caption */
.wk-carousel-caption {
    background: rgba(212, 175, 55, 0.9);
    padding: 10px;
    border-radius: 5px;
}

/* Form dropdown visibility */
.wk-dropdown-visible {
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

/* Report cards visibility */
#reportDetails,
#emptyState {
    display: none;
}

/* Preview content area */
.wk-preview-content {
    background: #fff;
    color: #000;
    padding: 1rem;
    border-radius: var(--radius);
}

/* Text colors */
.text-gold {
    color: var(--gold);
}

.text-muted {
    color: var(--muted);
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */
@media (max-width: 575px) {
    /* Shortcut cards mobile */
    .shortcut-card {
        min-height: 150px;
        padding: 1.25rem;
    }
    
    .shortcut-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .shortcut-title {
        font-size: 1rem;
    }
    
    .shortcut-description {
        font-size: 0.85rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* Buttons */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Cards */
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    /* Tables */
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
    }
    
    /* Autocomplete */
    .autocomplete-results {
        max-height: 250px;
        font-size: 16px;
    }
    
    .autocomplete-item {
        padding: 14px 15px;
        font-size: 16px;
    }
    
    /* Nearby panel */
    .nearby-panel {
        max-height: 60vh;
        background: var(--surface);
        padding-bottom: 16px;
    }
    
    .nearby-list {
        padding: 1.2rem 0.7rem 0.7rem 0.7rem;
    }
    
    .nearby-panel .list-group-item {
        font-size: 1.1rem;
        padding: 1.1rem 1rem;
        border-radius: 10px;
        margin-bottom: 0.5rem;
        min-height: 56px;
        background-color: var(--bg-darker);
        color: var(--text);
    }
    
    /* Legend/Status filters */
    #legend {
        gap: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    #status-filters {
        width: 100%;
        justify-content: space-around;
    }
    
    .status-filter-item img {
        width: 28px;
        height: 28px;
    }
    
    .status-label {
        font-size: 0.75rem;
    }
    
    /* Filter dropdown (mobile) */
    .filter-dropdown {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        bottom: 20px;
        max-width: calc(100vw - 40px);
        max-height: 50vh;
    }
    
}

@media (max-width: 576px) {
    .btn {
        width: 100%;
    }
    
    .fs-5 {
        font-size: 1.1rem;
    }
    
    #search-results {
        max-height: 200px;
    }
    
    #scan-preview-img,
    #existing-scan-preview-img,
    #collection-scan-preview-img {
        max-height: 200px;
    }
}

@media (min-width: 769px) {
    #legend {
        flex-wrap: nowrap;
    }
    
    #status-filters {
        gap: 1.5rem;
        flex-wrap: nowrap;
    }
}
