/* CSS Custom Properties for Theme Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #212529;
    --border-color: #dee2e6;
    --section-hover-bg: #f8f9fa;
    --navbar-bg: #f8f9fa;
    --resizer-color: #6c757d;
    --video-container-bg: #b1b1b1;
    --section-active-bg: #bae2ff;
}

/* Dark Theme Variables */
[data-bs-theme="dark"] {
    --bg-color: #212529;
    --text-color: #ffffff;
    --border-color: #495057;
    --section-hover-bg: #343a40;
    --navbar-bg: #343a40;
    --resizer-color: #adb5bd;
    --video-container-bg: #161616;
    --section-active-bg: #1a365d;
}

/* Base Body Styles */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Body styles for call viewer (fixed height, no scroll) */
body.call-viewer {
    overflow: hidden;
}

/* Ensure all pages account for fixed navbar */
body {
    padding-top: 0; /* Reset any default padding */
}

/* Main Layout Container */
.main-container {
    display: flex;
}

/* Main container for call viewer (fixed height) */
body.call-viewer .main-container {
    height: calc(100vh - 80px);
    margin-top: 80px !important; /* Directly under navbar, no extra padding */
}

/* Ensure navbar is always visible in call-viewer */
body.call-viewer .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    min-height: 80px !important;
    z-index: 1030 !important;
}

/* Main container for normal pages - remove flex constraints */
body:not(.call-viewer) .main-container {
    display: block;
    min-height: calc(100vh - 80px);
    margin-top: 95px !important; /* 80px navbar + 15px padding for other pages */
    padding-top: 0;
}

/* Ensure normal page content has proper spacing */
body:not(.call-viewer) .container,
body:not(.call-viewer) .container-fluid {
    padding-bottom: 5px;
}

/* Additional safety margin for containers in pages with fixed navbar */
body:not(.call-viewer) .container:first-child,
body:not(.call-viewer) .container-fluid:first-child {
    margin-top: 1rem !important; /* Extra margin for the first container */
}

/* Table of Contents Panel */
.toc-panel {
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    min-width: 300px;
    max-width: 70%;
    width: 50%;
    flex: none;
    display: flex !important;
    flex-direction: column;
    position: relative;
    contain: layout style paint !important; /* Improve rendering performance and stability */
}

/* Ensure toc-panel-header width matches parent */
/* TOC Panel Header - sticky positioning with original layout preserved */
.toc-panel-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 60px;
    max-height: 80px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    margin: 0;
    /* CSS containment and hardware acceleration for stability */
    transform: translateZ(0);
    will-change: transform;
    contain: layout style paint;
}

/* Ensure TOC panel container has proper stacking context */
.toc-panel {
    position: relative;
    z-index: 10;
}

/* Force scroll container to respect sticky header */
.toc-sections {
    position: relative;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Scrollable content areas */
.toc-sections, .transcription-content {
    overflow-y: auto;
    flex: 1;
}

.ai-question-container {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1px;
    background-color: var(--bg-color);
}

/* Ensure header content is always visible */
.toc-panel-header h5 {
    margin: 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.toc-panel-header .btn-group {
    flex-shrink: 0 !important;
    margin-left: 0.5rem !important;
}

.toc-panel-header .btn {
    font-size: 0.875rem !important;
    padding: 0.375rem 0.75rem !important;
    white-space: nowrap !important;
}

/* Scrollable content areas */
.toc-sections, .transcription-content {
    overflow-y: auto;
    flex: 1;
}

/* Video Player Panel */
.video-panel {
    flex: 1;
    background-color: var(--bg-color);
    position: relative;
    width: 50%;
}

/* Resizable Divider */
.resizer {
    width: 5px;
    background-color: var(--resizer-color);
    cursor: col-resize;
    user-select: none;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 10;
}

.resizer:hover {
    opacity: 0.8;
}

.resizer:active {
    opacity: 1;
    background-color: #0d6efd;
}

/* Add visual feedback for resizer */
.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 30px;
    background-color: currentColor;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resizer:hover::before {
    opacity: 0.5;
}

/* Table of Contents Section Items */
.section-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.section-item:hover {
    background-color: var(--section-hover-bg);
}

.section-item.active {
    background-color: var(--section-active-bg);
    border-left: 12px solid #0d6efd;
    font-weight: 500;
}

.section-item:last-child {
    border-bottom: none;
}

/* Share link button */
.share-link-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    color: #0d6efd;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    z-index: 5;
}

.section-item:hover .share-link-btn {
    opacity: 1;
}

.share-link-btn:hover {
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.5);
    transform: scale(1.05);
}

.share-link-btn:active {
    transform: scale(0.98);
}

/* Dark theme support for share button */
[data-bs-theme="dark"] .share-link-btn {
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.4);
    color: #74a9ff;
}

[data-bs-theme="dark"] .share-link-btn:hover {
    background: rgba(13, 110, 253, 0.3);
    border-color: rgba(13, 110, 253, 0.6);
}

/* Transcription Items */
.transcript-item {
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: flex-start;
}

.transcript-item:hover {
    background-color: var(--section-hover-bg);
}

.transcript-item.active {
    background-color: var(--section-hover-bg);
    border-left: 4px solid #0d6efd;
}

.transcript-item:last-child {
    border-bottom: none;
}

.transcript-timestamp {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0d6efd;
    margin-right: 0.75rem;
    flex-shrink: 0;
    min-width: 75px;
}

.transcript-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Section Timestamp Styling */
.section-timestamp {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #0d6efd;
    text-decoration: none;
}

.section-timestamp:hover {
    text-decoration: underline;
}

/* Section Title Styling */
.section-title {
    font-weight: 600;
    margin: 0.5rem 0;
}

/* Section Text Content */
.section-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Video Container */
.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--video-container-bg);
}

/* Video Player Elements */
#youtube-player,
#html5-video-player {
    width: 100%;
    height: 100%;
}

.html5-video-player {
    display: block;
    background-color: #000;
    object-fit: contain;
}

/* No Video Placeholder */
.no-video-placeholder {
    background-color: var(--video-container-bg);
    min-height: 400px;
}

.no-video-placeholder i {
    opacity: 0.6;
}

.no-video-placeholder h4,
.no-video-placeholder p {
    opacity: 0.8;
}

/* Generic Video Iframe Styling */
.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.call-navigation {
    background: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.1);
    padding: 0.5rem 1rem;
    margin: 0 -1rem;
}

.call-navigation .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}


#youtube-player,
#html5-video-player {
    width: 100%;
    height: 400px;
    min-height: 300px;
}

@media (min-width: 768px) {
    #youtube-player,
    #html5-video-player {
        height: 450px;
    }
}

@media (min-width: 1200px) {
    #youtube-player,
    #html5-video-player {
        height: 500px;
    }
}

body.call-viewer .video-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
}

body.call-viewer .video-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
}

body.call-viewer #youtube-player,
body.call-viewer #html5-video-player {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
}

/* Navigation Bar Styling */
.navbar {
    background-color: var(--navbar-bg, #f8f9fa) !important;
    border-bottom: 1px solid var(--border-color, #dee2e6);
    padding: 0.5rem 1rem;
    min-height: 80px !important;
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    width: 100% !important;
}

.navbar-brand {
    max-width: calc(100% - 50px); /* Leave space for user menu */
    flex: 1;
}

.navbar-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    max-width: 100%;
}

.navbar-date {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Navbar elements styling */
.navbar .nav-link {
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
}

.navbar .nav-item .dropdown-menu {
    background-color: var(--bg-color);
    border-color: var(--border-color);
}

.navbar .dropdown-item {
    color: var(--text-color);
}

.navbar .dropdown-item:hover {
    background-color: var(--section-hover-bg);
}

/* Logo theme switching */
.navbar-logo {
    height: 32px;
    width: auto;
    transition: opacity 0.3s ease;
}

/* Show light logo by default, hide dark logo */
.light-theme-logo {
    display: inline-block;
}

.dark-theme-logo {
    display: none;
}

/* In dark theme, show dark logo and hide light logo */
[data-bs-theme="dark"] .light-theme-logo {
    display: none;
}

[data-bs-theme="dark"] .dark-theme-logo {
    display: inline-block;
}

/* Responsive navbar adjustments */
@media (max-width: 767.98px) {
    .navbar-brand {
        max-width: calc(100% - 50px);
    }
    
    .navbar-title {
        font-size: 0.9rem;
    }
    
    .navbar-date {
        font-size: 0.75rem;
    }
    
    /* Mobile layout adjustments */
    .main-container {
        flex-direction: column;
    }
    
    .toc-panel {
        width: 100% !important;
        max-width: none;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .video-panel {
        width: 100% !important;
        height: 60vh;
    }
    
    .resizer {
        width: 100%;
        height: 5px;
        cursor: row-resize;
    }
    
    .resizer::before {
        width: 30px;
        height: 3px;
    }
    
    /* Enhanced toc-panel-header for tablet view */
    .toc-panel-header {
        padding: 0.875rem !important;
        min-height: 55px !important;
        max-height: 70px !important;
    }
}

@media (max-width: 575.98px) {
    .navbar-title {
        font-size: 0.85rem;
    }
    
    .navbar-date {
        font-size: 0.7rem;
    }
    
    .toc-panel {
        height: 45vh;
    }
    
    .video-panel {
        height: 55vh;
    }
    
    /* Enhanced mobile responsiveness for toc-panel-header */
    .toc-panel-header {
        padding: 0.75rem !important;
        min-height: 50px !important;
        max-height: 60px !important;
    }
    
    .toc-panel-header h5 {
        font-size: 1rem !important;
    }
    
    .toc-panel-header .btn {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Theme Selector Styles */
.theme-option {
    cursor: pointer;
}

/* Theme Selector in User Dropdown */
.dropdown-menu .theme-option {
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.dropdown-menu .theme-option:hover {
    background-color: var(--section-hover-bg);
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-1px);
}

.dropdown-menu .theme-option:active {
    transform: translateY(0);
}

.dropdown-menu .theme-option.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

.dropdown-menu .theme-option.active:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-menu .theme-option {
    border-color: #495057;
}

[data-bs-theme="dark"] .dropdown-menu .theme-option:hover {
    border-color: #0d6efd;
    background-color: #495057;
}

/* AI Question Box Styles */
.ai-question-container {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1px;
    background-color: var(--bg-color);
}

.ai-question-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    font-weight: 500;
}

.ai-question-header:hover {
    background-color: var(--section-hover-bg);
}

.ai-question-content {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.ai-response-content {
    background-color: var(--section-hover-bg);
    border-radius: 0.375rem;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-line;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.ai-response-header {
    font-weight: 500;
    color: var(--text-color);
}

/* End of AI Question Box Styles */

/* Admin Panel Styles */
.admin-panel .card {
    margin-bottom: 20px;
}

.admin-panel .table th {
    font-weight: 600;
}

.admin-panel .badge {
    font-size: 85%;
}

/* User management table */
.table-responsive {
    overflow-x: auto;
}

.table td .btn-group {
    white-space: nowrap;
}

/* Modal form styling */
.modal-body .form-label {
    font-weight: 500;
}

.modal-body .text-danger {
    font-weight: bold;
}

/* Call Status Badge Styles */
.badge.bg-warning {
    color: #000 !important;
    font-weight: 600;
}

.badge.bg-success {
    font-weight: 600;
}

.badge.bg-secondary {
    font-weight: 600;
}


/* folder card styles */

.folder-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.1);
    overflow: hidden;
    height: 200px; /* 1/4 size of call cards */
}

.folder-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.2);
}

.folder-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.folder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.folder-default-icon {
    color: #6c757d;
}

.organization-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: rgba(0, 0, 0, 0.1);
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: rgba(0, 0, 0, 0.1);
}

.folder-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.3;
    color: inherit;
}

.folder-subtitle {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.organization-folder {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.project-folder {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

/* Breadcrumb Styling */
.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-weight: bold;
    color: #6c757d;
}

/* View Toggle Buttons */
.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Dark mode support for folder cards */
[data-bs-theme="dark"] .folder-card {
    border-color: #495057;
    background-color: #343a40;
}

[data-bs-theme="dark"] .folder-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.4);
}

[data-bs-theme="dark"] .organization-folder {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-bs-theme="dark"] .project-folder {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

[data-bs-theme="dark"] .folder-default-icon {
    color: #adb5bd;
}

/* Special styling for NO ORGANIZATION and NO PROJECT folders */
.no-organization-folder {
    background: linear-gradient(135deg, #7b7f84 0%, #d6d7e8 100%) !important;
    border: 2px solid #6f6f6f;
}

.no-project-folder {
    background: linear-gradient(135deg, #7b7f84 0%, #d6d7e8 100%) !important;
    border: 2px solid #6f6f6f;
}

[data-bs-theme="dark"] .no-organization-folder {
    background: linear-gradient(135deg, #7b7f84 0%, #d6d7e8 100%) !important;
    border: 2px solid #6f6f6f;
}

[data-bs-theme="dark"] .no-project-folder {
    background: linear-gradient(135deg, #7b7f84 0%, #d6d7e8 100%) !important;
    border: 2px solid #6f6f6f;
}

.no-organization-folder .folder-title,
.no-project-folder .folder-title {
    color: #212529 !important;
    font-weight: 600;
}

[data-bs-theme="dark"] .no-organization-folder .folder-title,
[data-bs-theme="dark"] .no-project-folder .folder-title {
    color: #fff !important;
}

/* Call Cards Styling */
.call-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,.1);
    overflow: hidden;
}

.call-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.2);
}

.call-card .card-img-top img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.call-card .card-img-top {
    overflow: hidden;
}

.call-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: inherit;
}

.call-card .btn {
    font-weight: 500;
}

/* Clickable card link styling */
.call-card a {
    color: inherit;
    text-decoration: none;
}

.call-card a:hover {
    color: inherit;
}

/* Project footer styling */
.project-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 1rem;
    margin-top: auto;
}

.project-footer .project-icon {
    width: 40px;
    height: 40px;
    border-radius: 25px;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.1);
}

.project-footer .project-info {
    flex: 1;
    min-width: 0;
}

.project-footer .project-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-footer .project-shortname {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-footer .bi-arrow-right-circle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease;
}

.call-card:hover .project-footer .bi-arrow-right-circle {
    transform: translateX(3px);
}

/* No project footer styling */


.project-footer.no-project .project-icon-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-footer.no-project .project-icon-placeholder i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.project-footer.no-project .project-name {
    color: rgba(255, 255, 255, 0.9);
}

.project-footer.no-project .project-shortname {
    color: rgba(255, 255, 255, 0.6);
}

.no-project-footer {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    padding: 0.75rem 1rem;
    margin-top: auto;
}

.no-project-footer span {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.no-project-footer .bi-arrow-right-circle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.2s ease;
}

.call-card:hover .no-project-footer .bi-arrow-right-circle {
    transform: translateX(3px);
}

/* Dark mode support for card body */
[data-bs-theme="dark"] .call-card .card-body {
    background-color: #2b3238;
}

[data-bs-theme="dark"] .call-card {
    border-color: #495057;
    background-color: #343a40;
}

[data-bs-theme="dark"] .call-card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.4);
}

/* Dark mode adjustments for project footer */
[data-bs-theme="dark"] .project-footer {
    background: linear-gradient(135deg, #4c63d2 0%, #5a4b82 100%);
}


/* Remove default card footer border */
.card-footer {
    border-top: none;
}

/* Note temporali styles */
.add-note-btn {
    position: absolute;
    top: 1rem;
    right: 3.2rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    color: #ffc107;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    z-index: 4;
}

.section-item:hover .add-note-btn {
    opacity: 1;
}

.add-note-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
    transform: scale(1.05);
}

.add-note-btn:active {
    transform: scale(0.98);
}

/* Dark theme support for add note button */
[data-bs-theme="dark"] .add-note-btn {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffda6a;
}

[data-bs-theme="dark"] .add-note-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.6);
}

/* Note item styles - Compact design */
.note-item {
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin: 0.25rem 0;
    border-radius: 6px;
}

.note-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.note-item.active {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.note-item:last-child {
    border-bottom: none;
}

.note-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.note-item:hover .note-content {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.note-timestamp {
    font-weight: 600;
    color: #0d6efd;
    font-size: 0.875rem;
    min-width: 4rem;
    flex-shrink: 0;
}

.note-text {
    font-size: 0.875rem;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
    font-weight: 500;
}

.note-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.note-item:hover .note-actions {
    opacity: 1;
}

.note-actions .btn {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 3px;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.note-actions .btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Dark theme support for note actions */
[data-bs-theme="dark"] .note-content {
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .note-item:hover .note-content {
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .note-actions .btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-bs-theme="dark"] .note-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modale per aggiungere note */
.modal-note-colors {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.color-option {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.color-option.selected {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

/* Timestamp input groups */
.timestamp-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.timestamp-inputs .form-control {
    width: 4rem;
    text-align: center;
}

.timestamp-inputs .separator {
    font-weight: bold;
    color: var(--text-muted);
}
