/* Zoom Manager Main Styles */
:root {
    --primary-color: #002F6B;
    --secondary-color: #FFCC00;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --border-color: #dee2e6;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e9ecef;
    --sidebar-text: #495057;
    --sidebar-text-muted: #6c757d;
    --sidebar-hover: #f8f9fa;
    --sidebar-active: #e7f1ff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #001f4d;
    border-color: #001f4d;
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #003875);
    color: white;
    border-radius: 16px 16px 0 0 !important;
    border: none;
    padding: 1.25rem 1.5rem;
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.badge {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 47, 107, 0.15);
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
}

.meeting-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-left: 4px solid var(--primary-color);
}

.recording-card {
    background: linear-gradient(135deg, #fff, #f0f8ff);
    border-left: 4px solid var(--info-color);
}

.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #003875);
    color: white;
}

.stats-card .card-body {
    padding: 2rem;
}

.sidebar {
    background: white;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.main-content {
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-header {
        border-radius: 12px 12px 0 0 !important;
        padding: 1rem 1.25rem;
    }
}

/* ===================================
   ZOOM MANAGER - RESPONSIVE SIDEBAR
   =================================== */

/* ===================================
   GLOBAL LAYOUT
   =================================== */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.main-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* ===================================
   SIDEBAR STYLES
   =================================== */

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1030;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* ===================================
   SIDEBAR HEADER
   =================================== */

.sidebar-header {
    border-bottom: 1px solid var(--sidebar-border);
    background-color: var(--sidebar-bg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
}

.sidebar-brand .brand-text {
    transition: var(--transition);
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    transform: translateX(-10px);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--sidebar-text-muted);
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background-color: var(--sidebar-hover);
    color: var(--primary-color);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* ===================================
   USER INFO SECTION
   =================================== */

.sidebar-user {
    border-bottom: 1px solid var(--sidebar-border);
}

.user-info {
    transition: var(--transition);
}

.user-avatar {
    flex-shrink: 0;
}

.user-details {
    min-width: 0;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.8rem;
    margin-top: 2px;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    transform: translateX(-10px);
}

/* ===================================
   NAVIGATION
   =================================== */

.sidebar-nav {
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.section-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-text-muted);
    transition: var(--transition);
}

.sidebar.collapsed .section-text {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: var(--sidebar-active);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.nav-icon {
    width: 20px;
    flex-shrink: 0;
    text-align: center;
    margin-right: 0.75rem;
    transition: var(--transition);
}

.nav-text {
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    transform: translateX(-10px);
}

.sidebar.collapsed .nav-item {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

/* ===================================
   SIDEBAR FOOTER
   =================================== */

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    margin-top: auto;
}

.quick-action-btn {
    transition: var(--transition);
}

.sidebar.collapsed .btn-text {
    opacity: 0;
}

.sidebar.collapsed .quick-action-btn {
    border-radius: 50%;
    padding: 0.75rem;
    width: auto;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .quick-action-btn i {
    margin: 0;
}

/* ===================================
   USER ACTIONS
   =================================== */

.sidebar-bottom {
    border-top: 1px solid var(--sidebar-border);
}

.user-actions {
    display: flex;
    flex-direction: column;
}

.action-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition);
}

.action-item:hover {
    background-color: var(--sidebar-hover);
    color: var(--primary-color);
}

.action-icon {
    width: 20px;
    flex-shrink: 0;
    text-align: center;
    margin-right: 0.75rem;
}

.action-text {
    transition: var(--transition);
}

.sidebar.collapsed .action-text {
    opacity: 0;
}

.sidebar.collapsed .action-item {
    padding: 0.75rem;
    justify-content: center;
}

.sidebar.collapsed .action-icon {
    margin-right: 0;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    min-height: 100vh;
    background-color: #f8f9fa;
    padding: 2rem;
    overflow-x: auto;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* ===================================
   SIDEBAR OVERLAY (Mobile)
   =================================== */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1025;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   RESPONSIVE BEHAVIOR
   =================================== */

/* Large screens (Desktop) */
@media (min-width: 992px) {
    .sidebar {
        display: flex !important;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}

/* Medium screens (Tablet) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Remove forced collapsed behavior for tablets */
    /* Let the sidebar behave naturally based on user preference */
    .sidebar {
        /* Keep the sidebar at its normal width unless user collapses it */
        width: var(--sidebar-width);
        display: flex !important;
        transition: var(--transition);
    }
    
    /* Only apply collapsed styles if the sidebar actually has the collapsed class */
    .sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .section-text,
    .sidebar.collapsed .user-details,
    .sidebar.collapsed .action-text,
    .sidebar.collapsed .btn-text {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .sidebar.collapsed .nav-item,
    .sidebar.collapsed .action-item {
        padding: 0.75rem;
        justify-content: center;
    }
    
    .sidebar.collapsed .nav-icon,
    .sidebar.collapsed .action-icon {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        transition: var(--transition);
    }
    
    .sidebar.collapsed ~ .main-content,
    .sidebar.collapsed + .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}

/* Small screens (Mobile) */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1040;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    /* Mobile navbar adjustments */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
}

/* ===================================
   CUSTOM SCROLLBAR
   =================================== */

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.sidebar.show {
    animation: slideInLeft 0.3s ease-out;
}

/* ===================================
   UTILITIES
   =================================== */

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================================
   BOOTSTRAP OVERRIDES
   =================================== */

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert {
    border: none;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* ===================================
   DARK MODE SUPPORT (Future)
   =================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be added here in the future */
}

/* ===================================
   MEETING CREATION ENHANCEMENTS
   =================================== */

.max-height-300 {
    max-height: 300px;
}

.form-check-label {
    cursor: pointer;
}

#agenda_items {
    resize: vertical;
    min-height: 120px;
}

.card-header h5, .card-header h6 {
    color: #495057;
}

.alert-light {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Recurring settings animation */
#recurringSettings {
    transition: all 0.3s ease-in-out;
}

/* Regular attendee selection styling */
.form-check-label .fw-bold {
    font-size: 0.9rem;
}

.form-check-label .text-muted {
    font-size: 0.8rem;
}

.form-check-label .text-primary {
    font-size: 0.8rem;
}

/* Custom checkbox styling for regulars */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Meeting form enhancements */
.meeting-form .card {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 1.5rem;
}

.meeting-form .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.meeting-form .form-control:focus,
.meeting-form .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.meeting-form .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

.meeting-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.25);
}

/* Agenda items styling */
.agenda-placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Days of week checkbox styling */
.days-of-week .form-check {
    margin-right: 1rem;
}

.days-of-week .form-check-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Regular attendees list styling */
.regulars-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
}

.regulars-list .form-check {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.regulars-list .form-check:hover {
    background-color: #e7f1ff;
    transform: translateX(5px);
}

.regulars-list .form-check-input:checked ~ .form-check-label {
    color: #0d6efd;
}

/* Timeline preview styling */
.timeline-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

/* Pro tips sidebar */
.pro-tips .list-unstyled li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.pro-tips .list-unstyled li:last-child {
    border-bottom: none;
}

/* Custom animation for form reveals */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Loading states */
.form-loading {
    position: relative;
    overflow: hidden;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading-sweep 1.5s infinite;
}

@keyframes loading-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===================================
   USER DROPDOWN STYLING
   =================================== */

/* Make the dropdown ellipsis very subtle */
.sidebar-user .dropdown button {
    opacity: 0.3;
    transition: opacity 0.2s ease;
    border: none;
}

/* Show more on hover of the user info area */
.sidebar-user:hover .dropdown button {
    opacity: 0.7;
}

/* Full opacity when directly hovering the button */
.sidebar-user .dropdown button:hover,
.sidebar-user .dropdown button:focus {
    opacity: 1;
    background: none;
    box-shadow: none;
}

/* Style the dropdown menu */
.sidebar-user .dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.5rem;
}

/* Make logout text less prominent */
.dropdown-item.text-muted {
    font-size: 0.875rem;
    opacity: 0.8;
}

.dropdown-item.text-muted:hover {
    opacity: 1;
    color: #6c757d !important;
}

/* Hide dropdown in collapsed sidebar */
.sidebar.collapsed .dropdown {
    display: none;
}

/* Keyboard shortcut hint styling */
.sidebar-footer small {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sidebar-footer:hover small {
    opacity: 0.8;
}

/* Hide keyboard hint in collapsed sidebar */
.sidebar.collapsed .sidebar-footer small {
    display: none;
}
