﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}


.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100%;
    background: linear-gradient(180deg, #495057 0%, #343a40 100%);
    padding-top: 0;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-right: 3px solid #17a2b8;
    transition: transform 0.3s ease;
}

.sidebar-header {
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    padding: 20px;
    border-bottom: 3px solid #17a2b8;
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #17a2b8 0%, #20c997 100%);
    border-radius: 2px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar .nav-item {
    width: 100%;
    margin-bottom: 5px;
}

.sidebar-link {
    padding: 12px 20px;
    color: #dee2e6 !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 0;
    display: flex;
    align-items: center;
}

.sidebar-link:hover {
    background-color: #495057;
    color: #ffffff !important;
    transform: translateX(3px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff !important;
    border-left: 4px solid #20c997;
    position: relative;
}

.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #20c997 0%, #17a2b8 100%);
    border-radius: 2px 0 0 2px;
}

.layout-container {
    margin-left: 240px;
    padding: 30px;
    background-color: #f8f9fa;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Provide sufficient contrast against white background */
a {
  color: #495057;
  text-decoration: none;
}

a:hover {
  color: #212529;
  text-decoration: underline;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  border-color: #17a2b8;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  border-color: #138496;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #495057;
  border-color: #343a40;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  color: #6c757d;
}

/* Additional professional styling */
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 600;
  margin-left: 60px; /* Make room for hamburger button */
}

.content {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #17a2b8;
  box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.15);
  transform: translateY(-1px);
}

.form-control:hover {
  border-color: #17a2b8;
}

.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background-color: #495057;
  color: #ffffff;
  border: none;
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Remove all blue theme elements and Bootstrap overrides */
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #495057 !important;
  border-color: #343a40 !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  color: #495057 !important;
  border-color: #495057 !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
  background-color: #495057 !important;
  border-color: #495057 !important;
  color: #ffffff !important;
}

.text-primary {
  color: #495057 !important;
}

.bg-primary {
  background-color: #495057 !important;
}

.border-primary {
  border-color: #495057 !important;
}

.navbar-brand {
  color: #ffffff !important;
}

.navbar-brand:hover, .navbar-brand:focus {
  color: #f8f9fa !important;
}

.navbar-nav .nav-link {
  color: #ffffff !important;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus {
  color: #f8f9fa !important;
}

/* Override any remaining blue colors */
.text-info {
  color: #6c757d !important;
}

.bg-info {
  background-color: #6c757d !important;
}

.alert-info {
  background-color: #f8f9fa !important;
  border-color: #dee2e6 !important;
  color: #495057 !important;
}

/* Professional navbar styling */
.navbar {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Professional button styling */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Professional form styling */
.form-control {
  transition: all 0.3s ease;
}

.form-control:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* DevExtreme theme overrides */
.dx-theme-generic-typography .dx-widget {
  color: #495057;
}

.dx-button-default {
  background-color: #495057 !important;
  border-color: #495057 !important;
  color: #ffffff !important;
}

.dx-button-default:hover {
  background-color: #343a40 !important;
  border-color: #343a40 !important;
}

.dx-datagrid-header-panel {
  background-color: #495057 !important;
  color: #ffffff !important;
}

.dx-header-row {
  background-color: #495057 !important;
  color: #ffffff !important;
}

.dx-datagrid .dx-column-lines > td {
  border-color: #dee2e6 !important;
}

.dx-datagrid-rowsview .dx-row:hover {
    background-color: #f8f9fa !important;
}

/* Menu Toggle Button (Always Visible) */
.mobile-menu-toggle {
    position: fixed;
    top: 70px;
    left: 15px;
    z-index: 10000;
    background-color: #495057;
    color: white;
    border: 2px solid #343a40;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: block !important; /* Always visible */
    font-size: 1.5rem;
    width: 56px;
    height: 56px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background-color: #343a40;
    transform: scale(1.05);
}

.mobile-menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(73, 80, 87, 0.5);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile Styles */
@media screen and (max-width: 767px) {
    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    /* Show sidebar when active */
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Adjust layout container for mobile */
    .layout-container {
        margin-left: 0;
        padding: 15px;
    }
    
    /* Hamburger is always visible, no need to show here */
    
    /* Adjust content padding for mobile */
    .content {
        padding: 20px 15px;
    }
    
    /* Make navbar responsive */
    .navbar-brand {
        font-size: 1.1rem;
        margin-left: 50px; /* Make room for hamburger menu */
    }
    
    /* Adjust form controls for mobile */
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Make tables responsive */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust footer for mobile */
    .footer {
        position: relative;
        padding: 0 15px;
        margin-top: 30px;
    }
    
    body {
        margin-bottom: 0;
    }
    
    /* Stack navbar items on mobile */
    .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar-nav .nav-item {
        padding: 0 5px;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 5px;
    }
    
    /* Adjust button sizes for mobile */
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    /* Ensure DevExtreme grids are responsive */
    .dx-datagrid {
        font-size: 12px;
    }
    
    .dx-datagrid .dx-header-row {
        font-size: 12px;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 991px) {
    .sidebar {
        width: 200px;
    }
    
    .layout-container {
        margin-left: 200px;
    }
    
    .content {
        padding: 25px;
    }
}

/* Small desktop styles */
@media (min-width: 992px) and (max-width: 1199px) {
    .sidebar {
        width: 220px;
    }
    
    .layout-container {
        margin-left: 220px;
    }
}

/* Message Board 2 - forum list style */
.mb2-forum-page {
    max-width: 1260px;
    margin: 0 auto;
    padding: 14px;
    color: #1f2d3d;
    position: relative;
}

.mb2-toast {
    position: fixed;
    right: 22px;
    top: 78px;
    background: #e8f5e9;
    color: #1d6f42;
    border: 1px solid #b7dfc3;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
}

.mb2-toast-close {
    border: 0;
    background: transparent;
    color: #1d6f42;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.mb2-forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mb2-forum-header h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #2f3b47;
}

.mb2-forum-tools input,
.mb2-new-topic textarea,
.mb2-reply-box textarea {
    width: 100%;
    border: 1px solid #c9d3de;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
}

.mb2-forum-tools input {
    min-width: 260px;
}

.mb2-new-topic {
    background: #f8f9fa;
    border: 1px solid #cfd7df;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.mb2-new-topic textarea,
.mb2-reply-box textarea {
    min-height: 80px;
    resize: vertical;
}

.mb2-row-actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb2-row-actions button {
    background: #495057;
    color: #ffffff;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
}

.mb2-row-actions button:hover {
    background: #343a40;
}

.mb2-forum-table {
    border: 1px solid #cfd7df;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.mb2-forum-head,
.mb2-topic-row {
    display: grid;
    grid-template-columns: 1fr 110px 110px 130px;
    align-items: center;
}

.mb2-forum-head {
    background: linear-gradient(180deg, #495057 0%, #343a40 100%);
    color: #eef2f6;
    font-weight: 600;
    border-bottom: 1px solid #2f353b;
}

.mb2-forum-head .mb2-col-topic,
.mb2-forum-head .mb2-col-num,
.mb2-forum-head .mb2-col-activity {
    color: #f8fafc;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.mb2-col-topic,
.mb2-col-num,
.mb2-col-activity {
    padding: 14px 16px;
}

.mb2-col-num,
.mb2-col-activity {
    text-align: center;
    font-weight: 600;
    color: #27394d;
}

.mb2-topic-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #e7edf3;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.mb2-topic-row:last-child {
    border-bottom: 0;
}

.mb2-topic-row:hover {
    background: #f1f4f7;
}

.mb2-topic-row-selected {
    background: #e9f5ed;
    box-shadow: inset 4px 0 0 #28a745;
}

.mb2-topic-entry {
    border-bottom: 1px solid #e7edf3;
}

.mb2-topic-entry:last-child {
    border-bottom: 0;
}

.mb2-topic-entry:has(.mb2-inline-panel) {
    background: #f8fbfd;
}

.mb2-topic-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.2;
}

.mb2-topic-preview {
    font-size: 16px;
    color: #344a61;
    margin-bottom: 6px;
}

.mb2-topic-meta {
    font-size: 12px;
    color: #6f8194;
}

.mb2-expand-indicator {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b6b78;
}

.mb2-inline-panel {
    background: linear-gradient(180deg, #f6fbff 0%, #fdfefe 100%);
    border-top: 1px solid #d8e2eb;
    padding: 0 18px 18px;
    animation: mb2-expand-in 0.18s ease-out;
}

.mb2-inline-panel-inner {
    max-width: 1000px;
    padding-top: 16px;
}

.mb2-message-card {
    border: 1px solid #e4eaf1;
    border-radius: 8px;
    background: #fcfdff;
    padding: 12px;
    margin-bottom: 10px;
}

.mb2-message-topic {
    background: #edf5ff;
    box-shadow: inset 3px 0 0 #28a745;
}

.mb2-message-author {
    font-weight: 700;
    color: #1e3650;
}

.mb2-message-date {
    font-size: 12px;
    color: #6b7d90;
    margin-bottom: 8px;
}

.mb2-message-body {
    color: #2d4156;
    line-height: 1.45;
}

.mb2-reply-box {
    margin-top: 10px;
}

.mb2-thread-empty {
    padding: 18px;
    color: #6e7f92;
}

.mb2-error {
    color: #b42318;
    font-size: 13px;
}

.mb2-hidden {
    display: none;
}

@keyframes mb2-expand-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .mb2-forum-head,
    .mb2-topic-row {
        grid-template-columns: 1fr 70px 70px 90px;
    }

    .mb2-topic-title {
        font-size: 18px;
    }

    .mb2-topic-preview {
        font-size: 14px;
    }
}
