/* Main Styles for Jeffrey Clark's Website */

/* Icon Container - Fixed aspect ratio with scaling support */
.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    margin-right: 0.5rem;
    flex-shrink: 0;
    overflow: hidden;
    --icon-scale: 1; /* Default scale */
}

.icon-container .bi {
    font-size: calc(1em * var(--icon-scale));
    margin: 0;
    transition: font-size 0.1s ease;
}

/* Scaling modifiers */
.icon-container.scale-75 { --icon-scale: 0.75; }
.icon-container.scale-80 { --icon-scale: 0.8; }
.icon-container.scale-90 { --icon-scale: 0.9; }
.icon-container.scale-110 { --icon-scale: 1.1; }
.icon-container.scale-125 { --icon-scale: 1.25; }
.icon-container.scale-150 { --icon-scale: 1.5; }

/* Compact spacing for buttons and tight layouts */
.btn .icon-container,
.icon-container.compact {
    margin-right: 0rem;
}

/* Inline Callout System */
.inline-callout {
    background: rgba(0, 123, 255, 0.1);
    border-left: 3px solid #007bff;
    padding: 12px 32px 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #495057;
    margin: 8px 0;
    position: relative;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.inline-callout.show { 
    opacity: 1; 
    transform: translateY(0); 
}

.info-btn.active { 
    color: #007bff !important; 
}

.callout-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1;
    color: #495057;
}

.callout-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.callout-close::before {
    content: "×";
    font-weight: 600;
    pointer-events: none;
}

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --navbar-bg: #ffffff;
    --navbar-text: #2d3748;
    --card-bg: #ffffff;
    --card-shadow: rgba(0,0,0,0.1);
    --hero-gradient: linear-gradient(135deg, #0a192f, #112240, #1a365d);
    --section-title-color: #2d3748;
}



/* Apply theme variables to body and common elements */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scroll offset for anchor links to account for fixed navbar */
html {
    scroll-padding-top: 80px;
}

/* Hero Section */
.hero-section {
    background: var(--hero-gradient);
    position: relative;
    max-height: 580px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
    padding: 3rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 140, 0, 0.25) 0%, rgba(255, 140, 0, 0) 70%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.15) 0%, rgba(255, 140, 0, 0) 50%);
    pointer-events: none;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* Profile Image */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Navbar Profile Image */
.navbar-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-image: url('/s/jeffrey_crop_rotated.jpg');
    background-size: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.navbar-name {
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.navbar-hidden {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
}

.navbar-visible {
    opacity: 1;
    transform: translateX(0);
}

.navbar-hidden-immediate {
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: none !important;
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--section-title-color);
    border-bottom: 3px solid #2a5298;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Project Cards */
.project-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--card-shadow);
    background-color: var(--card-bg);
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    height: 100%;
}

/* Disabled card hover effects */
/* .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
} */

/* Buttons */
.btn-custom {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-custom:hover {
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(42, 82, 152, 0.3);
}

.social-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.social-btn:hover {
    color: white;
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}

.copy-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.copy-btn:hover {
    box-shadow: 0 4px 16px rgba(42, 82, 152, 0.3);
}

.copy-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.3);
}

/* Layout Sections */
.navbar {
    box-shadow: 0 2px 4px var(--card-shadow);
    background-color: var(--navbar-bg) !important;
    transition: background-color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--navbar-text) !important;
    transition: color 0.3s ease;
}

.navbar-light .navbar-brand {
    color: var(--navbar-text) !important;
    transition: color 0.3s ease;
}

.navbar-light .navbar-toggler {
    border-color: var(--border-color);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Admin Button in Navbar */
.admin-link {
    color: #2a5298 !important;
    font-size: 1.2rem;
    padding: 0.6rem 0.8rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(42, 82, 152, 0.1);
    margin-right: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border: 2px solid rgba(42, 82, 152, 0.2);
}

.admin-link:hover {
    color: #1e3c72 !important;
    background: rgba(42, 82, 152, 0.2);
    border-color: rgba(42, 82, 152, 0.4);
    text-decoration: none;
}

.admin-link i {
    font-size: 1.1rem;
}

/* Admin Button Mobile Responsive */
@media (max-width: 768px) {
    .admin-link {
        margin-right: 0.75rem;
        min-width: 40px;
        height: 40px;
        padding: 0.5rem !important;
    }
    
    .admin-link i {
        font-size: 1rem;
    }
}



.about-section {
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.footer-section {
    background-color: #2d3748;
    color: white;
}

.contact-link {
    color: #2a5298;
    text-decoration: none;
}

.contact-link:hover {
    color: #1e3c72;
    text-decoration: none;
}

/* Email Button Countdown Animation */
.countdown-active {
    position: relative;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Collaboration section countdown styling */
.collaboration-section .countdown-active {
    background: rgba(30, 60, 114, 0.8) !important;
    color: white !important;
}

.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.countdown-number {
    font-weight: bold;
    font-size: 1.1em;
}

/* Special Sections */
.tech-stack {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    padding: 1.5rem;
}

.current-work {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-radius: 8px;
    padding: 1.5rem;
}

.collaboration-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2a5298;
    background: rgba(42, 82, 152, 0.1);
    border: 1px solid rgba(42, 82, 152, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
}


.tech-callout {
    background: rgba(42, 82, 152, 0.05);
    border: 1px solid rgba(42, 82, 152, 0.2);
    border-left: 3px solid #2a5298;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

/* CV Specific Styles */
.skill-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #6c757d;
    border-radius: 0.25rem;
    color: #6c757d;
    background-color: transparent;
    text-decoration: none;
    cursor: default;
}

.cv-header {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.cv-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.cv-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.cv-name {
    font-size: 2rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

.cv-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
}

.cv-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.cv-social-buttons .social-btn {
    color: #2c3e50;
    border-color: #2c3e50;
    background: rgba(255, 255, 255, 0.8);
}

.cv-social-buttons .social-btn:hover {
    color: white;
    border-color: #2c3e50;
    background: #2c3e50;
}

.cv-social-buttons .social-btn.countdown-active {
    color: #2c3e50 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #2c3e50 !important;
}

.cv-social-buttons .countdown-number {
    color: #2c3e50 !important;
}

/* Hero Section Inline Styles */
.hero-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.hero-location {
    color: rgba(255, 255, 255, 0.75);
}

.hero-verification {
    color: rgba(255, 255, 255, 0.6);
}

.hero-verification a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

.hero-profile-bg {
    background-image: url('/s/jeffrey_crop_rotated.jpg');
    background-size: 100%;
}

/* CV Thesis Sections */
.thesis-section {
    border-left-width: 4px !important;
}

/* Navbar Brand */
.navbar-brand-custom {
    color: #333;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Coming Soon Badge Styling */
.badge-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.social-icons a {
    font-size: 1.5rem;
    margin: 0 0.5rem;
    color: white;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-section .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Simplified gradient for mobile */
    .hero-section::before {
        top: -40%;
        right: -70%;
        width: 200%;
        height: 180%;
        background: radial-gradient(circle at right center, rgba(255, 140, 0, 0.25) 0%, rgba(255, 140, 0, 0) 60%);
    }
    
    .hero-section::after {
        background: radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.1) 0%, rgba(255, 140, 0, 0) 40%);
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
        border-width: 2px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-section h5 {
        font-size: 0.95rem;
    }
    
    .hero-section .small {
        font-size: 0.75rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }

    .hero-location {
        font-size: 0.8rem;
    }
}

/* CV Responsive Styles */
@media (max-width: 768px) {
    .cv-title {
        font-size: 2rem;
    }
    .cv-name {
        font-size: 1.5rem;
    }
    .cv-profile-photo {
        width: 120px;
        height: 120px;
    }
    .cv-social-buttons {
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Add bottom margin to badges on mobile to prevent stacking without spacing */
    .badge {
        margin-bottom: 0.5rem !important;
    }
}

/* ===== SCB EXPLORER MODAL STYLES ===== */

/* Mobile-First Modal Design */

/* Base Mobile Modal Styles */
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 10px 10px 10px; /* Top padding to avoid navbar */
    overflow-y: auto;
}

/* Centered Modal for small dialogs */
.mobile-modal.centered {
    align-items: center;
    padding: 20px;
}

.mobile-modal-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    height: 90vh;
    max-height: 600px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Mobile Header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
    background: #f8f9fa;
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mobile-close-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.mobile-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.mobile-step-counter {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Progress Bar */
.mobile-progress {
    height: 3px;
    background: #e9ecef;
    flex-shrink: 0;
}

.mobile-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #5ba0f2);
    width: 25%;
    transition: width 0.3s ease;
}

/* Step Dots */
.mobile-steps {
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-step-dot.active {
    background: #4a90e2;
    color: white;
}

.mobile-step-dot.completed {
    background: #28a745;
    color: white;
}

/* Step Title */
.mobile-step-title {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    line-height: 1.3;
    flex-shrink: 0;
}

/* Search Box */
.mobile-search {
    padding: 0 16px 8px 16px;
    flex-shrink: 0;
}

.mobile-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: border-color 0.2s ease;
}

.mobile-search-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

/* Content Area */
.mobile-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.mobile-step-content {
    display: none;
    padding: 8px 0 60px 0; /* Bottom padding for navigation buttons */
}

.mobile-step-content.active {
    display: block;
}

/* Purpose Grid */
.mobile-purpose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 8px 0;
}

.mobile-purpose-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
}

.mobile-purpose-btn:hover {
    border-color: #4a90e2;
    background: #e8f2ff;
    color: #4a90e2;
}

.mobile-purpose-btn.active {
    border-color: #4a90e2;
    background: #4a90e2;
    color: white;
}

.mobile-purpose-btn.active i {
    color: white;
}

.mobile-purpose-btn i {
    font-size: 1.5rem;
    color: #4a90e2;
}

/* Category Grid */
.mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.category-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.category-item:hover {
    border-color: #4a90e2;
    background: #e8f2ff;
}

.category-item:hover .category-count {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.25);
    color: #4a90e2;
}

.category-item.active {
    border-color: #4a90e2;
    background: #4a90e2;
    color: white;
}

.category-item.active .category-icon {
    color: white;
}

.category-item.active .category-name {
    color: white;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.category-icon {
    font-size: 1.2rem;
    color: #4a90e2;
    margin-bottom: 4px;
}

.category-name {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    color: #495057;
    margin-bottom: 2px;
}

.category-count {
    font-size: 0.6rem;
    color: #8e9aaf;
    margin-top: 4px;
    font-weight: 500;
    background: rgba(74, 144, 226, 0.08);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.15);
}

/* Dataset List */
.mobile-dataset-list {
    margin: 8px 0;
    max-height: 300px;
    overflow-y: auto;
}

.dataset-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dataset-card:hover {
    border-color: #4a90e2;
    background: #e8f2ff;
}

.dataset-card.active {
    border-color: #4a90e2;
    background: #e8f2ff;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.dataset-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    color: #2d3748;
}

.dataset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.7rem;
    color: #6c757d;
}

.dataset-id {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
}

.badge-custom {
    background: #4a90e2;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
}

/* Dataset Info */
.mobile-dataset-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
}

.mobile-dataset-info h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.mobile-description {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #6c757d;
}

.mobile-period {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Variables */
.mobile-variables {
    margin: 8px 0;
}

.mobile-variables h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

/* Navigation */
.mobile-nav {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    background: #f8f9fa;
}

.mobile-nav-btn {
    flex: 1;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-nav-btn:hover {
    background: #1e3c72;
}

.mobile-prev-btn {
    background: #6c757d;
}

.mobile-prev-btn:hover {
    background: #5a6268;
}

.mobile-finish-btn {
    background: #28a745;
}

.mobile-finish-btn:hover {
    background: #218838;
}

/* Tablet Responsive */
@media (min-width: 768px) {
    .mobile-modal-container {
        max-width: 500px;
        height: 80vh;
        max-height: 700px;
    }
    
    .mobile-purpose-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mobile-category-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* Desktop Responsive */
@media (min-width: 1024px) {
    .mobile-modal-container {
        max-width: 600px;
        height: 75vh;
        max-height: 800px;
    }
}

/* ===== SCB EXPLORER DASHBOARD STYLES ===== */

/* Dashboard and Plot Container Styles */
.dashboard-container {
    padding: 20px;
}

.dashboard-controls {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plots-grid {
    margin-bottom: 30px;
}

.plot-row {
    margin-bottom: 20px;
}

.add-plot-section {
    text-align: center;
    margin-top: 30px;
    padding: 40px 20px;
}

.add-plot-section .btn {
    display: inline-block;
    margin: 0 auto;
}

.plot-generator {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.plot-generator:hover {
    /* No shadow change to prevent visual movement */
}

.plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.plot-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex-grow: 1;
}

.plot-actions {
    display: flex;
    gap: 8px;
}

.plot-actions .btn-group .dropdown-menu {
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    z-index: 9999 !important;
}

/* Ensure plot-generator has high z-index when dropdown is open */
.plot-generator.dropdown-active {
    z-index: 9998 !important;
}

.plot-actions .btn-group .dropdown-item {
    padding: 8px 16px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plot-actions .btn-group .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2a5298;
}

.plot-actions .btn-group .dropdown-item i {
    width: 16px;
    text-align: center;
}

.plot-export-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.plot-export-actions .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.plot-export-actions .btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.plot-content {
    min-height: 300px;
}

.plot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    color: #718096;
    text-align: center;
}

.plot-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.chart-container-plot {
    position: relative;
    height: 300px;
    width: 100%;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-icon:hover {
    /* No transform to prevent movement */
}

/* Remove dropdown carets from download and share buttons */
.btn-icon.dropdown-toggle::after {
    display: none;
}

/* Data Source Panel */
.data-source-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.data-source-panel .row {
    background: white;
    border-radius: 20px;
    max-width: 1200px;
    width: calc(100% - 40px);
    height: calc(100vh - 180px);
    max-height: 700px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    margin: 0 !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
    display: flex;
    flex-direction: column;
    margin-top: 60px !important;
}

/* Step Indicators and Modal Steps */
.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
    gap: 20px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    min-width: 60px;
}

.step-item:hover {
    background: rgba(42, 82, 152, 0.1);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: #2a5298;
    color: white;
    transform: scale(1.1);
}

.step-item.active .step-label {
    color: #2a5298;
    font-weight: 600;
}

.step-item.completed .step-number {
    background: #28a745;
    color: white;
}

.step-item.completed .step-label {
    color: #28a745;
}

/* Step title styling */
.step-title-main {
    text-align: center;
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 5px 0 5px 0;
    padding-bottom: 0;
}

/* Purpose Cards */
.purpose-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.purpose-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

.purpose-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.purpose-card:hover {
    border-color: #2a5298;
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.15);
}

.purpose-card.selected {
    border-color: #2a5298;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
}

/* Category Grid */
.category-grid-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.category-grid-section h5 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2a5298;
}

.category-limited {
    max-height: 400px;
    overflow-y: auto;
}

.table-limited {
    display: none;
}

.table-limited.show {
    display: block;
}

.table-count-badge {
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Mobile plot optimizations */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .plot-generator {
        padding: 15px;
        border-radius: 12px;
    }
    
    .plot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .plot-title {
        font-size: 1rem;
        width: 100%;
    }
    
    .plot-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .add-plot-section {
        padding: 20px 10px;
    }
    
    .add-plot-section .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .plot-header .d-none.d-md-flex .plot-actions {
        margin-left: auto;
    }
}

/* General non-selectable rules for all interactive elements */
button, .btn, .badge, .step-dot, .step-indicator {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Dashboard Dropdown Styling */
.dashboard-status-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 80px;
    position: relative;
}

.dropdown-item.d-flex {
    align-items: center !important;
    padding: 10px 16px !important;
    min-height: 40px;
}

.dropdown-item.d-flex span:first-child {
    flex: 1;
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 0.9rem;
}

.dropdown-item.d-flex span:last-child {
    flex-shrink: 0;
    margin-left: 20px;
}

.dropdown-header {
    font-weight: 600 !important;
    color: #495057 !important;
    padding: 12px 16px 8px 16px !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-header i {
    margin-right: 5px !important;
}

.dropdown-item.d-flex:hover {
    background-color: #f8f9fa !important;
}

/* Dashboard icon alignment */
.dropdown-item.d-flex .bi-grid-3x3-gap,
.dropdown-item.d-flex .bi-person {
    width: 16px;
    text-align: center;
    margin-right: 5px;
}

/* Default text styling */
.dashboard-default-text {
    margin-left: 8px;
}

/* Status icon styling - Fixed positioning for consistent alignment */
.dashboard-status-icons .bi-share-fill {
    font-size: 13px;
    padding: 3px 6px;
    border-radius: 6px;
    position: absolute;
    right: 24px;
    color: #17a2b8 !important;
    background: rgba(23, 162, 184, 0.15);
}

.dashboard-status-icons .bi-check-circle {
    font-size: 16px;
    position: absolute;
    right: 0px;
}

.dashboard-status-icons .bi-eye-fill {
    font-size: 13px;
    padding: 3px 6px;
    border-radius: 6px;
    position: absolute;
    right: 24px;
}

/* Chart Animation Styles */
.chart-bar {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border-radius: 3px 3px 0 0;
    animation: chartPulse 6s ease-in-out infinite;
    transform-origin: bottom;
    margin-right: 2px;
    opacity: 0.9;
}

@keyframes chartPulse {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.2);
    }
}

/* Dashboard Controls Desktop Padding */
@media (min-width: 992px) {
    .dashboard-controls-wrapper {
        padding: 0 40px;
    }
}

/* Floating Action Button for Dark Mode Toggle */
.dark-mode-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(42, 82, 152, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(42, 82, 152, 0.4);
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.dark-mode-fab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.3), 0 6px 24px rgba(42, 82, 152, 0.4);
}

.dark-mode-fab:active {
    transform: scale(0.95);
}

.dark-mode-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

/* Dark mode styles moved to dark-mode.css */

/* Dark mode FAB and mobile responsive styles moved to dark-mode.css */

/* All remaining dark mode styles moved to dark-mode.css */

/* ========================================
   COOKIE MODAL STYLES
   ======================================== */

.cookie-modal {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background-color: var(--card-bg);
    color: var(--text-primary);
    max-width: 600px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.cookie-modal-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

.cookie-modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.cookie-modal-header .btn-close {
    background: transparent;
    border: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.cookie-modal-header .btn-close:hover {
    opacity: 1;
}

.cookie-modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cookie-categories {
    margin-bottom: 1.5rem;
}

.cookie-category {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-secondary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.cookie-category-title .icon-container {
    margin-right: 0.75rem;
}

.cookie-category-title .icon-container i {
    color: var(--text-secondary);
    margin-right: 0;
}

.cookie-modal-header .modal-title .icon-container {
    margin-right: 0.75rem;
}

.cookie-modal-header .modal-title .icon-container i {
    margin-right: 0;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.cookie-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.cookie-toggle {
    width: 50px;
    height: 26px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle.active {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    border-color: #28a745;
}

.cookie-toggle-slider {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active .cookie-toggle-slider {
    transform: translateX(24px);
}

.cookie-toggle-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.cookie-toggle:not(.disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.cookie-toggle:not(.disabled) {
    cursor: pointer;
    user-select: none;
}

.cookie-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.cookie-summary p {
    margin: 0;
    font-size: 0.9rem;
    font-style: italic;
}

.cookie-modal-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.cookie-modal-footer .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.cookie-modal-footer .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
    background: transparent;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.cookie-modal-footer .btn-outline-secondary:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.cookie-modal-footer .btn-custom {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.cookie-modal-footer .btn-custom:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    color: white;
    transform: translateY(-1px);
}

.cookie-modal-footer .btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
}

.cookie-modal-footer .btn-primary {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    min-width: 140px;
}

.cookie-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #1a355f 0%, #234a84 100%);
    box-shadow: 0 4px 16px rgba(42, 82, 152, 0.3);
    transform: translateY(-1px);
}

/* Clean preset buttons layout */
.cookie-presets {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-presets .btn {
    flex: 1;
    max-width: 140px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    min-height: 38px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make Essential Only button wider to fit text on one line */
.cookie-presets .btn:first-child {
    max-width: 160px;
}

/* Big save button layout */
.cookie-save-action {
    display: flex;
    justify-content: center;
}

.cookie-save-action .btn {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.875rem 3rem;
    border-radius: 10px;
    min-width: 200px;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.cookie-save-action .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cookie-modal {
        width: 95vw;
        margin: 1rem;
    }
    
    .cookie-modal-body {
        padding: 1.5rem;
    }
    
    .cookie-category-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .cookie-toggle-container {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        min-width: auto;
        margin-top: 0.5rem;
    }
    
    .cookie-modal-footer {
        padding: 1rem;
        gap: 1rem;
    }
    
    .cookie-presets .btn {
        max-width: none;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        min-height: 34px;
    }
    
    .cookie-presets .btn:first-child {
        max-width: none;
    }
    
    .cookie-save-action .btn {
        width: 100%;
        min-width: auto;
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }
}

/* Animation for modal appearance */
.modal.fade .cookie-modal {
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .cookie-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Prevent modal jiggling and improve scroll behavior */
.modal {
    overflow-x: hidden;
    overflow-y: auto;
}

.modal.show {
    padding-right: 0 !important;
}

.modal-backdrop {
    position: fixed;
}

/* Ensure modal body scrolls properly */
.cookie-modal-body {
    overscroll-behavior: contain;
}

/* Prevent background scroll when modal is open */
/* body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
} */



/* Force icon spacing on all icons in this template */
 .icon-spacing {
    margin-right: 0.5rem !important;
}