/* --- General Table Look & Feel --- */
.dash-table {
  border-collapse: collapse !important;
}

/* Enforce the list-view style by removing vertical borders */
.dash-cell, .dash-header {
  border-left: none !important;
  border-right: none !important;
}

/* --- Header Styling --- */
.dash-header {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  font-weight: bold !important;
  text-align: left !important;
  padding: 10px !important;
  border-bottom: 1px solid var(--bs-border-color) !important;
}

/* --- Cell Styling --- */
.dash-cell {
  background-color: transparent !important;
  color: var(--bs-body-color) !important;
  padding: 10px !important;
  text-align: left !important;
  border-bottom: 1px solid var(--bs-gray-300) !important;
}

/* --- Conditional Styling --- */

/* Zebra-striping for odd rows */
.dash-row:nth-of-type(odd) .dash-cell {
  background-color: var(--bs-secondary-bg) !important;
}

/* Highlight for selected rows */
.dash-row.selected .dash-cell {
  background-color: var(--bs-primary-bg-subtle) !important;
  color: var(--bs-primary-text-emphasis) !important;
  border-top: 1px solid var(--bs-primary) !important;
  border-bottom: 1px solid var(--bs-primary) !important;
}

/* --- Filter Input Styling --- */
.dash-filter input {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 3px !important;
}

.dash-filter input:focus {
    color: var(--bs-body-color) !important;
}

.dash-delete-cell {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

.expanded-row--empty-cell {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

.dash-filter {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}

/* For changing a button's color to the dark one */
.custom-dark-btn {
    border-color: #003B40 !important;
    color: #003B40 !important;
}

.custom-dark-btn:hover {
    background-color: #003B40 !important;
    border-color: #003B40 !important;
    color: white !important;
}

/* For changing the color of the download data button */
.custom-download-btn {
    border-color: #00989A !important;
    color: #00989A !important;
}

.custom-download-btn:hover {
    background-color: #00989A !important;
    border-color: #00989A !important;
    color: white !important;
}

/* For changing the color of the feedback data button */
.custom-feedback-btn {
    border-color: #00989A !important;
    color: #00989A !important;
}

.custom-feedback-btn:hover {
    background-color: #00989A !important;
    border-color: #00989A !important;
    color: white !important;
}



.gradient-navbar {
    background: linear-gradient(135deg, #003B40 0%, #003B40 80%, #02FFFF 100%) !important;
}

/* This is for the font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');
body, .dash-app-container, * {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.card-title-bold {
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    letter-spacing: -0.025em !important;
    color: #003B40 !important;
}

.main-title {
    font-weight: 900 !important;
    font-size: 1.7rem !important;
    letter-spacing: -0.025em !important;
}

/* Ensure Font Awesome icons load */
.fa, .fas, .far, .fal, .fab {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}

/* Override font family for icons specifically */
i[class*="fa-"] {
    font-family: "Font Awesome 5 Free" !important;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Tutorial CSS Start */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10050;
    pointer-events: auto;
    cursor: pointer;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    pointer-events: auto;
}

.tutorial-popup {
    position: fixed !important;
    background: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    max-width: 300px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    z-index: 10052 !important;
    pointer-events: none !important;
}

.tutorial-highlight {
    position: relative !important;
    z-index: 10051 !important;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4) !important;
    pointer-events: auto !important;
    border-radius: 15px !important;
    transition: all 0.3s ease !important;
}

/* Add a subtle pulse border to draw attention */
.tutorial-highlight::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 2px solid #00989A;
    border-radius: 18px;
    animation: tutorial-pulse 2s infinite;
    pointer-events: none;
}

@keyframes tutorial-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.01); }
}
/* Tutorial CSS End */

#tutorial-button {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

#tutorial-button i {
    font-size: 1.6rem !important;
    transform: translateY(+1px) !important;
}

/* Make segment column cells look clickable */
.dash-cell[data-dash-column="Segment"] {
    cursor: pointer !important;
    color: #003b40 !important;
    font-weight: bold !important;
}

/* Hover effect for segment cells */
.dash-cell[data-dash-column="Segment"]:hover {
    background-color: #c2d0d1 !important;
    transform: scale(1.02) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(159, 251, 251, 0.3) !important;
}

/* Ensure hover works even on zebra-striped rows */
.dash-row:nth-of-type(odd) .dash-cell[data-dash-column="Segment"]:hover {
    background-color: #c2d0d1 !important;
}

/* Custom progress bar using CSS variables */
.custom-progress-bar {
    --bs-progress-bar-bg: #00272A !important;
    border-radius: 15px !important;
    overflow: hidden !important;
}

.custom-progress-bar .progress-bar {
    background-color: var(--bs-progress-bar-bg) !important;
    border-radius: 15px !important;
}

/* Custom striped colors */
.custom-progress-bar.progress-bar-striped .progress-bar,
.custom-progress-bar .progress-bar-striped {
    background-image: linear-gradient(45deg, 
        rgba(0, 152, 154, 0.4) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(0, 152, 154, 0.4) 50%, 
        rgba(0, 152, 154, 0.4) 75%, 
        transparent 75%, 
        transparent) !important;
    background-size: 1rem 1rem !important;
}

/* Ensure the background container is also rounded */
.custom-progress-bar.progress {
    border-radius: 15px !important;
    overflow: hidden !important;
}

/* ==================== INTRO SCREEN STYLES ==================== */

/* Main intro screen container */

.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.intro-screen-exit {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    z-index: -1 !important;
    backdrop-filter: none !important;  /* Add this */
    background: transparent !important;  /* Add this */
    animation: hideAfterExit 0.1s ease-in-out 0.8s forwards;
}


@keyframes hideAfterExit {
    to {
        display: none;
    }
}

.intro-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.intro-content {
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.intro-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #003B40;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.intro-subtitle {
    font-size: 1.4rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.intro-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #003B40 0%, #00989A 100%);
    border: none;
    margin: 2rem auto;
    border-radius: 2px;
}

.intro-feature-title {
    color: #003B40;
    font-weight: 700;
    margin-bottom: 1rem;
}

.intro-features {
    text-align: left;
    display: inline-block;
    color: #495057;
    font-size: 1.1rem;
    line-height: 1.8;
    list-style: none !important; /* Remove default bullets */
    padding-left: 0 !important; /* Remove default indentation */
}

.intro-features li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
    list-style: none !important; /* Ensure no bullets on individual items */
}

.intro-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00989A;
    font-weight: bold;
    font-size: 1.2rem;
}

.intro-prompt {
    font-size: 1.2rem;
    color: #495057;
    font-weight: 500;
}

.intro-controls-container {
    width: 100%;
    max-width: 500px;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.intro-controls-card {
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.intro-controls-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 59, 64, 0.1) !important;
}

/* Dashboard states */
.dashboard-hidden {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dashboard-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: dashboardSlideIn 0.8s ease-out 0.6s both;
}

.dashboard-visible.tutorial-mode {
    transform: none !important;
    animation: none !important;
}

@keyframes dashboardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .intro-title { font-size: 2.5rem; }
    .intro-subtitle { font-size: 1.2rem; }
    .intro-container { padding: 1rem; gap: 2rem; }
}

@media (max-width: 576px) {
    .intro-title { font-size: 2rem; }
    .intro-subtitle { font-size: 1.1rem; }
}