/* CloudBlitz Admin Panel - Main Stylesheet */
:root {
  --primary: #ff7700;
  --primary-light: #ff9933;
  --primary-dark: #e66000;
  --secondary: #333333;
  --secondary-light: #555555;
  --secondary-dark: #222222;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --gray: #e0e0e0;
  --dark-gray: #888888;
  --danger: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --info: #17a2b8;
}

/* Enhanced Sidebar Toggle Button Animation */
#sidebarCollapse {
    width: 40px;
    height: 40px;
    position: relative;
    background: #5a6268;
    border: none;
    border-radius: 4px;
    padding: 0;
    transition: all 0.3s;
    outline: none;
    overflow: hidden;
}

#sidebarCollapse:hover {
    background: #343a40;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

#sidebarCollapse:active {
    transform: translateY(1px);
}

/* Hamburger Icon Animation */
#sidebarCollapse .hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    margin: 10px auto;
    transform: rotate(0deg);
    transition: 0.5s ease-in-out;
    cursor: pointer;
}

#sidebarCollapse .hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

/* Hamburger Icon Lines Positioning */
#sidebarCollapse .hamburger-icon span:nth-child(1) {
    top: 0px;
}

#sidebarCollapse .hamburger-icon span:nth-child(2),
#sidebarCollapse .hamburger-icon span:nth-child(3) {
    top: 8px;
}

#sidebarCollapse .hamburger-icon span:nth-child(4) {
    top: 16px;
}

/* Transformed Hamburger Icon when Sidebar is active */
#sidebarCollapse.active .hamburger-icon span:nth-child(1) {
    top: 8px;
    width: 0%;
    left: 50%;
}

#sidebarCollapse.active .hamburger-icon span:nth-child(2) {
    transform: rotate(45deg);
}

#sidebarCollapse.active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg);
}

#sidebarCollapse.active .hamburger-icon span:nth-child(4) {
    top: 8px;
    width: 0%;
    left: 50%;
}

/* Sidebar Transition Effects */
#sidebar {
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

#sidebar.active {
    margin-left: -250px;
}

#content {
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 100%;
}

#content.active {
    margin-left: 0;
}

/* Additional Styling for Sidebar Links with Hover Effects */
#sidebar ul li a {
    padding: 15px 20px;
    display: block;
    color: #6c757d;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover {
    color: #007bff;
    background: #f8f9fa;
    border-left: 3px solid #007bff;
}

#sidebar ul li.active > a {
    color: #007bff;
    background: #f8f9fa;
    border-left: 3px solid #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
    }
    #sidebar.active {
        margin-left: 0;
        position: fixed;
        height: 100%;
        z-index: 999;
    }
    #sidebarCollapse.active {
        position: fixed;
        z-index: 1000;
    }
    .navbar {
        padding: 10px 15px;
    }
}
/* Bootstrap Overrides */
.border-left-primary {
  border-left: 4px solid var(--primary) !important;
}

.border-left-success {
  border-left: 4px solid var(--success) !important;
}

.border-left-info {
  border-left: 4px solid var(--info) !important;
}

.border-left-warning {
  border-left: 4px solid var(--warning) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

/* Base Styles */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f8f9fc;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  position: relative; /* Important for positioning */
}

/* Sidebar */
#sidebar {
  min-width: 250px;
  max-width: 250px;
  background: var(--secondary-dark);
  color: #fff;
  transition: all 0.3s;
  position: fixed;
  height: 100vh;
  z-index: 999;
  left: 0; /* Explicitly set left position */
  top: 0; /* Explicitly set top position */
}

#sidebar.active {
  margin-left: -250px;
}

#sidebar .sidebar-header {
  padding: 20px;
  background: #1a1a1a;
}

#sidebar .sidebar-header h3 {
  color: #fff;
  margin: 0;
  font-weight: 700;
}

#sidebar .sidebar-header h3 span {
  color: var(--primary);
}

#sidebar ul.components {
  padding: 20px 0;
  border-bottom: 1px solid #444;
}

#sidebar ul p {
  color: #fff;
  padding: 10px;
}

#sidebar ul li a {
  padding: 12px 20px;
  font-size: 1.1em;
  display: block;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
}

#sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

#sidebar ul li a:hover {
  color: var(--primary);
  background: #2c2c2c;
}

#sidebar ul li.active > a {
  color: #fff;
  background: var(--primary);
}

/* Content */
#content {
  width: calc(100% - 250px); /* Important: Calculate width based on sidebar */
  min-height: 100vh;
  transition: all 0.3s;
  position: relative; /* Changed from absolute to relative */
  margin-left: 250px; /* Add margin instead of padding */
  padding: 0; /* Remove padding */
}

#content.active {
  width: 100%;
  margin-left: 0;
}

/* Navbar */
.navbar {
  padding: 15px 10px;
  background: #fff;
  border: none;
  border-radius: 0;
  margin-bottom: 30px;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  width: 100%; /* Ensure navbar takes full width */
}

.navbar-btn {
  box-shadow: none;
  outline: none !important;
  border: none;
}

/* Cards */
.card {
  margin-bottom: 24px;
  border: none;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

.card-header h6 {
  font-weight: 700;
  color: var(--primary);
}

/* Stats Cards */
.card.border-left-primary,
.card.border-left-success,
.card.border-left-info,
.card.border-left-warning {
  border-left-width: 4px !important;
}

.text-gray-300 {
  color: #dddfeb !important;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

/* Tables */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #e3e6f0;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #e3e6f0;
}

/* Forms */
.form-control {
  display: block;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #6e707e;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #d1d3e2;
  border-radius: 0.35rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #6e707e;
  background-color: #fff;
  border-color: var(--primary-light);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(255, 119, 0, 0.25);
}

/* TinyMCE specific styles */
.tox-tinymce {
  border-radius: 0.35rem !important;
  border-color: #d1d3e2 !important;
}

.tox .tox-statusbar {
  border-top: 1px solid #e3e6f0 !important;
}

.tox .tox-toolbar, .tox .tox-toolbar__overflow, .tox .tox-toolbar__primary {
  background-color: #f8f9fc !important;
  border-bottom: 1px solid #e3e6f0 !important;
}

.mce-content-body {
  font-family: 'Roboto', sans-serif !important;
  font-size: 14px !important;
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -250px;
  }
  #sidebar.active {
    margin-left: 0;
  }
  #content {
    width: 100%;
    margin-left: 0;
  }
  #content.active {
    margin-left: 250px;
    width: calc(100% - 250px);
  }
  #sidebarCollapse span {
    display: none;
  }
  
  /* Fix for mobile content padding */
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.35rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.badge-success {
  color: #fff;
  background-color: var(--success);
}

.badge-warning {
  color: #fff;
  background-color: var(--warning);
}

.badge-secondary {
  color: #fff;
  background-color: #858796;
}

/* Utilities */
.shadow {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.h-100 {
  height: 100% !important;
}

.font-weight-bold {
  font-weight: 700 !important;
}

/* Custom file input styling */
.custom-file-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Fix for container padding */
.container-fluid {
  padding: 1.5rem;
}
/* Additional styles for instructor pages */
.instructor-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.instructor-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.rating-stars {
  color: var(--warning);
}

.instructor-details {
  margin-bottom: 20px;
}

.instructor-details .label {
  font-weight: bold;
  color: var(--secondary);
}

.instructor-details .value {
  margin-bottom: 10px;
}

.expertise-tag {
  display: inline-block;
  background-color: var(--light-gray);
  padding: 5px 10px;
  margin: 2px;
  border-radius: 15px;
  font-size: 0.9rem;
}

.social-links a {
  display: block;
  margin-bottom: 5px;
  color: var(--primary);
}

.social-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .instructor-image,
  .instructor-placeholder {
    width: 100px;
    height: 100px;
    font-size: 2rem;
  }
}
