/* Theming Variables */

:root {
    --primary-color: #0054fb;
    --primary-color-light: #e0e7ff;
    --sidebar-bg: #180110;
    --sidebar-text: #e9bad9;
    --sidebar-text-active: #FCFFE7;
}



body {
    background: #f8f9fa; /* A light background for the content area */

    background: linear-gradient(90deg, transparent 24%,#f9f9f9 25%, #f9f9f9 30%, transparent 31%, transparent 39%,#f9f9f9 40%, #f9f9f9 45%, transparent 45%),linear-gradient(180deg, transparent 24%,#f9f9f9 25%, #f9f9f9 30%, transparent 31%, transparent 39%,#f9f9f9 40%, #f9f9f9 45%, transparent 45%);
        background-size: 2em 2em;
        background-color: #ffffff;

    background-attachment: fixed;
        
}

nav.navbar {
    z-index: 9999;
}



/*----admin dashboard----*/

.admin-dashboard-stat .card {
    border: 0px !important;
    border-radius: 15px;
}

.admin-dashboard-stat .card-header, .admin-dashboard-stat .card-footer {
    border: 0px !important;
}

.admin-dashboard-stat .col-md-4:nth-of-type(1) .card{
    background: radial-gradient(at center, #6ba6ff, #0071ee);
}

.admin-dashboard-stat .col-md-4:nth-of-type(2) .card{
    background: radial-gradient(at center, #2cd59c, #04865b);
}

.admin-dashboard-stat .col-md-4:nth-of-type(3) .card{
    background: radial-gradient(at center, rgb(244 225 35), #d8a300);
}





/*----admin sidebar--------*/


/* --- Fixed Top Navbar --- */
.top-navbar {
    border-bottom: 1px solid #e7e7e7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* --- Wrapper and Main Content --- */
#admin-wrapper {
    padding-top: 56px; /* Height of the fixed navbar */
    display: flex;
    align-items: stretch;
}

#content {
    width: 100%;
    transition: margin-left 0.3s ease-in-out;
}

#content main {
    padding: 1.5rem;
}

/* --- The Sidebar --- */
#sidebar {
    min-width: 250px;
    max-width: 250px;
    height: calc(100vh - 56px); /* Full height minus navbar height */
    position: fixed;
    top: 56px;
    left: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s ease-in-out;
    z-index: 1020; /* High z-index */
}

/* Sidebar Header & Links styling (same as before) */
#sidebar .sidebar-header { padding: 20px; background: #f7f7f7; }
#sidebar ul.components p { color: #fff; padding: 10px; }
#sidebar ul li a { padding: 10px 15px; font-size: 1.1em; display: block; color: var(--sidebar-text); border-left: 3px solid transparent; text-decoration: none; }
#sidebar ul li a:hover { color: #fff; background: var(--primary-color); }
#sidebar ul li.active > a, a[aria-expanded="true"] { color: #fff; background: var(--primary-color); border-left: 3px solid var(--sidebar-text-active); }
ul ul a { font-size: 0.9em !important; padding-left: 30px !important; background: rgba(0,0,0,0.2); }

/* --- DESKTOP BEHAVIOR --- */
/* (When sidebar is not toggled) */
#content {
    margin-left: 250px; /* Make space for the visible sidebar */
}

/* (When sidebar is toggled on desktop - "toggled" class) */
#sidebar.toggled {
    left: -250px; /* Slide it off-screen */
}

#content.toggled {
    margin-left: 0; /* Content takes full width */
}

/* --- MOBILE BEHAVIOR (<= 768px) --- */
@media (max-width: 768px) {
    /* On mobile, sidebar is hidden by default */
    #sidebar {
        left: -250px;
    }
    
    /* When toggled, it slides in */
    #sidebar.toggled {
        left: 0;
        box-shadow: 0 0 15px rgba(0,0,0,0.3);
    }

    /* On mobile, content always takes full width */
    #content {
        margin-left: 0;
    }

    /* Overlay for mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1010; /* Lower than sidebar */
        top: 56px;
        left: 0;
    }
    .sidebar-overlay.active {
        display: block;
    }
}



/*----------------*/







/* Homepage Hero Section */
.hero-section {
    background-color: #f8f9fa; /* A light, neutral background */
    padding: 6rem 0;
    text-align: center;
}

.hero-section .display-4 {
    font-weight: 700;
    color: #343a40; /* A dark, strong heading color */
}

.hero-section .lead {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #6c757d; /* A softer color for the subheading */
}

.hero-section .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}






/* Comment Thread Styling */
.comment-thread {
    padding: 1rem;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    max-width: 85%;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.comment-text {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background-color: #f8f9fa;
    line-height: 1.5;
    
}

/* Styling for the current user's comments (right-aligned) */
.comment.comment-right {
    flex-direction: row-reverse;
}

.comment.comment-right .comment-body {
    text-align: right;
}

.comment.comment-right .comment-header {
    flex-direction: row-reverse;
}

.comment.comment-right .comment-text {
    background-color: var(--primary-color-light);
    color: #333;
}





/* Custom File Input for Comments */
.comment-form-wrapper {
    position: relative;
}

/* 1. Visually hide the real file input */
.comment-attachment-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

/* 2. Style our new paperclip button */
.comment-attachment-trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: pointer;
    color: #6c757d; /* A neutral gray */
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.comment-attachment-trigger:hover {
    background-color: #e9ecef; /* Light gray on hover */
    color: #212529; /* Darker on hover */
}

/* 3. Style the area where selected filenames will be displayed */
#comment-file-list {
    font-size: 0.8rem;
    margin-top: 8px;
    padding-left: 0; /* Remove default list padding */
    list-style-type: none; /* Remove bullets */
}

#comment-file-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 5px;
    margin-bottom: 5px;
}








/* Attachment Styling */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.attachment-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem; /* Bootstrap's default border-radius */
    text-align: center;
    padding: 1rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: #212529;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}

.attachment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.attachment-card .icon {
    font-size: 2.5rem; /* Large icon */
}

.attachment-card .filename {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    word-break: break-word; /* Prevents long filenames from breaking the layout */
}

.attachment-card .filename {
    display: inline-block;      /* or block/inline-block as needed */
    max-width: 20ch;            /* roughly 4 average “words” (adjust as needed) */
    white-space: nowrap;        /* prevent wrapping */
    overflow: hidden;           /* cut off excess text */
    text-overflow: ellipsis;    /* show “…” at the end */
  }



a.dropdown-toggle[aria-expanded="true"] {
    color: white !important;
}

table.dev-table th {
    white-space: nowrap;
}

table.dev-table td:nth-of-type(1) {
    min-width: 200px;
}

table.dev-table td:nth-of-type(5) {
    min-width: 150px;
}