/* ===================================================================
   BOOTSTRAP 5 THEME OVERRIDES
   =================================================================== */
/* Override Bootstrap's color system with Kboodle brand colors */

:root {
    /* ===================================================================
       BRAND COLORS
       =================================================================== */
    
    /* Primary: Brand Pink */
    --bs-primary: #f30072;
    --bs-primary-rgb: 243, 0, 114;
    --bs-primary-text-emphasis: #610e2d;
    --bs-primary-bg-subtle: #fde6f0;
    --bs-primary-border-subtle: #fbc2de;
    
    /* Brand Pink Variants (for legacy support) */
    --brand-pink: #f30072;
    --brand-pink-alt: #e91e63;
    --brand-pink-hover: #d1005f;

    /* Secondary: Dark Purple */
    --bs-secondary: #2d1e2f;
    --bs-secondary-rgb: 45, 30, 47;
    --bs-secondary-text-emphasis: #1a1219;
    --bs-secondary-bg-subtle: #e5e3e6;
    --bs-secondary-border-subtle: #cbc6cd;

    /* Tertiary: Light Blue (Dropzone color) */
    --bs-tertiary: #cfe4f9;
    --bs-tertiary-rgb: 207, 228, 249;
    --bs-tertiary-text-emphasis: #2a4a63;
    --bs-tertiary-bg-subtle: #f0f6fd;
    --bs-tertiary-border-subtle: #dfeaf8;

    /* Info: Vanilla Yellow */
    --bs-info: #fcf6b1;
    --bs-info-rgb: 252, 246, 177;

    /* Success: Celadon Green */
    --bs-success: #a9e5bb;
    --bs-success-rgb: 169, 229, 187;

    /* Warning: Xanthous */
    --bs-warning: #f7b32b;
    --bs-warning-rgb: 247, 179, 43;

    /* Danger: Red CMYK */
    --bs-danger: #f72c25;
    --bs-danger-rgb: 247, 44, 37;

    /* Link color: Primary (pink) */
    --bs-link-color: #f30072;
    --bs-link-hover-color: #d1005f;

    /* ===================================================================
       GRAYSCALE COLORS (Bootstrap-compatible)
       =================================================================== */
    
    /* White */
    --bs-white: #ffffff;
    --bs-white-rgb: 255, 255, 255;
    
    /* Grays - Bootstrap 5 scale */
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;
    
    /* Legacy gray references */
    --gray-light: #f8f9fa;
    --gray-border: #dee2e6;
    --gray-border-alt: #e9ecef;
    --gray-text: #495057;
    --gray-text-muted: #6c757d;
    --gray-dark: #333;
    --gray-darker: #666;
    
    /* Black */
    --bs-black: #000000;
    --bs-black-rgb: 0, 0, 0;
    --bs-dark: #212529;
    --bs-dark-rgb: 33, 37, 41;

    /* ===================================================================
       BLUE COLORS (for UI elements, links, etc.)
       =================================================================== */
    
    --blue-primary: #0d6efd;
    --blue-primary-rgb: 13, 110, 253;
    --blue-light: #e7f3ff;
    --blue-lighter: #e3f2fd;
    --blue-text: #1976d2;

    /* ===================================================================
       FILTER GRADIENTS
       =================================================================== */
    
    --filter-gradient-start: rgba(243, 0, 114, 0.2);
    --filter-gradient-end: rgba(243, 0, 114, 0.4);
    --filter-gradient-hover-start: rgba(243, 0, 114, 0.25);
    --filter-gradient-hover-end: rgba(243, 0, 114, 0.45);
    --filter-border: rgba(243, 0, 114, 0.3);
    --filter-border-hover: rgba(243, 0, 114, 0.4);

    /* ===================================================================
       BACKGROUND COLORS
       =================================================================== */
    
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-overlay-light: rgba(0, 0, 0, 0.5);
    --bg-overlay-white: rgba(255, 255, 255, 0.9);
    --bg-backdrop-dark: rgba(0, 0, 0, 1);

    /* ===================================================================
       BORDER COLORS
       =================================================================== */
    
    --border-color: #dee2e6;
    --border-color-alt: #e9ecef;
    --border-color-dark: #adb5bd;

    /* ===================================================================
       TEXT COLORS
       =================================================================== */
    
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-body: #495057;
    --text-light: #666;
}

/* Button Component Overrides - Bootstrap 5 uses component-level CSS variables */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #f30072;
    --bs-btn-border-color: #f30072;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #d1005f;
    --bs-btn-hover-border-color: #d1005f;
    --bs-btn-focus-shadow-rgb: 243, 0, 114;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #d1005f;
    --bs-btn-active-border-color: #d1005f;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #f30072;
    --bs-btn-disabled-border-color: #f30072;
}

.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #2d1e2f;
    --bs-btn-border-color: #2d1e2f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1a1219;
    --bs-btn-hover-border-color: #1a1219;
    --bs-btn-focus-shadow-rgb: 45, 30, 47;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1a1219;
    --bs-btn-active-border-color: #1a1219;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #2d1e2f;
    --bs-btn-disabled-border-color: #2d1e2f;
}

.btn-tertiary {
    --bs-btn-color: #000;
    --bs-btn-bg: #cfe4f9;
    --bs-btn-border-color: #cfe4f9;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #b8d7f5;
    --bs-btn-hover-border-color: #b8d7f5;
    --bs-btn-focus-shadow-rgb: 207, 228, 249;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #b8d7f5;
    --bs-btn-active-border-color: #b8d7f5;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #cfe4f9;
    --bs-btn-disabled-border-color: #cfe4f9;
}

/* Anchor tags styled as buttons - disable all :visited styling
   Browsers apply default purple color to visited links which breaks button styling.
   Using !important to ensure visited buttons look identical to unvisited ones. */
a.btn:visited {
    color: var(--bs-btn-color) !important;
}

a.btn:visited:hover {
    color: var(--bs-btn-hover-color) !important;
}

/* Outline variants need explicit color resets */
a.btn-outline-primary:visited { color: var(--bs-primary) !important; }
a.btn-outline-secondary:visited { color: var(--bs-secondary) !important; }
a.btn-outline-dark:visited { color: var(--bs-dark) !important; }
a.btn-outline-light:visited { color: var(--bs-light) !important; }
a.btn-outline-success:visited { color: var(--bs-success) !important; }
a.btn-outline-danger:visited { color: var(--bs-danger) !important; }
a.btn-outline-warning:visited { color: var(--bs-warning) !important; }
a.btn-outline-info:visited { color: var(--bs-info) !important; }

/* Buttons with .text-muted should stay muted when visited */
a.btn.text-muted:visited {
    color: var(--bs-secondary-color) !important;
}

/* Text color utilities */
.text-primary {
    color: var(--bs-primary) !important;
}

.text-secondary {
    color: var(--bs-secondary) !important;
}

/* Icon color utilities */
.icon-primary {
    color: var(--bs-primary);
}

.icon-secondary {
    color: var(--bs-secondary);
}

.icon-tertiary {
    color: var(--bs-tertiary);
}

.bg-dropzone {
    background-color: var(--dropzone-color);
}

/* Custom filter button styles */
.btn-filter {
    color: var(--bs-dark);
    border: 1px solid var(--bs-dark);
    background-color: transparent;
    border-radius: 0 !important;
}

/* Hover style for non-active filter buttons */
.btn-check:not(:checked) + .btn-filter:hover {
    color: var(--bs-dark);
    background-color: var(--bs-info); /* Lighter version of the active yellow */
    border-color: var(--bs-dark);
}

/* Style for the active/checked filter button */
.btn-check:checked + .btn-filter,
.btn-filter.active {
    color: var(--bs-dark);
    background-color: var(--bs-info);
    border-color: var(--bs-dark);
}

/* Custom extra small button size */
.btn-xs {
    padding: 0.1rem 0.3rem !important;
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    border-radius: 0.2rem !important;
}

/* Dropdown styling overrides */
.dropdown-menu {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-width: 150px;
    z-index: 1050;
}

/* Album dropdown menu - ensure it appears above content */
.album-dropdown-menu {
    z-index: 1050;
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

/* General style overrides to match the sharper design */
.filter-header h6 {
    border-radius: 0;
}
