/*
 *= require_tree .
 */
/* @import "pages"; */
/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Sidebar Layout Styles */

/* Main Layout Structure */
.sidebar-layout {
  display: grid;
  grid-template-areas: "header header" "sidebar main";
  grid-template-columns: 250px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* Header Styles */
#header {
  align-items: center;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  height: 60px;
  display: flex;
  grid-area: header;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  padding-left: 20px;
  width: 200px; /* Fixed width to create space */
}

.header-brand a {
  color: #7F00FF !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.header-brand a:hover {
  color: #5A00B8 !important;
  text-decoration: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-left: auto;
  padding-right: 20px;
  width: calc(100% - 200px); /* Adjust width to fill remaining space */
}

.header-actions a {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #7F00FF;
  transition: color 0.2s ease;
}

.header-actions a:hover {
  color: #5A00B8;
}

/* Sidebar Styles */
#sidebar {
  background-color: #f8f9fa;
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
  grid-area: sidebar;
  overflow-y: auto;
  padding: 16px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
}

/* Main Content Area */
#main {
  display: flex;
  flex-direction: column;
  grid-area: main;
  overflow: auto;
  padding: 16px;
}

/* Hamburger Menu Button */
.hamburger {
  display: none;
  padding: 8px;
  cursor: pointer;
  background-color: transparent;
  border: 0;
}

.hamburger-box {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}

.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: #1a202c;
  position: absolute;
  transition: transform 0.15s ease;
}

.hamburger-inner::before, .hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  bottom: -8px;
}

/* Sidebar Menu Styles */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  height: 100%;
}

.sidebar-menu__content {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
  overflow-y: auto;
}

.sidebar-menu__group {
  display: flex;
  flex-direction: column;
}

.sidebar-menu__group-label {
  color: #718096;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
}

.sidebar-menu__items {
  display: flex;
  flex-direction: column;
  row-gap: 4px;
}

.sidebar-menu__button {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  width: 100%;
  text-align: left;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: #495057;
  text-decoration: none;
}

.sidebar-menu__button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #212529;
}

.sidebar-menu__button[aria-current=page] {
  background-color: rgba(0, 0, 0, 0.1);
  color: #212529;
  font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .sidebar-layout {
    grid-template-areas:
      "header"
      "main";
    grid-template-columns: 1fr;
  }

  #sidebar {
    position: fixed;
    left: -250px;
    top: 60px;
    bottom: 0;
    width: 250px;
    transition: left 0.3s ease;
    z-index: 90;
    background-color: #ffffff;
  }

  #sidebar.open {
    left: 0 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: left 0.3s ease;
  }

  .hamburger {
    display: block;
  }
}

/* Form Action Button Spacing - Loaded after Bootstrap to ensure precedence */
.actions {
  margin-top: 32px !important;  /* 32px above actions */
  display: flex !important;
  gap: 16px !important;  /* 16px between actions */
  flex-wrap: wrap !important;
}

/* Multiple fallback methods for button spacing */
.actions .btn {
  margin-right: 16px !important;
}

.actions .btn:last-child {
  margin-right: 0 !important;
}

.actions > * + * {
  margin-left: 16px !important;
}

/* Bootstrap-specific overrides */
.actions input[type="submit"],
.actions .btn,
.actions a.btn {
  margin-right: 16px !important;
}

.actions input[type="submit"]:last-child,
.actions .btn:last-child,
.actions a.btn:last-child {
  margin-right: 0 !important;
}

/* CSS Zero utility class for horizontal flexbox layout */
.cz-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Test CSS with Hardcoded Values */
.test-css-zero {
  background-color: #f0f0f0;
  color: #333333;
  padding: 10px;
  border: 1px solid #cccccc;
}

/* Override Bootstrap success buttons to use purple theme */
.btn-outline-success {
  color: #7F00FF !important;
  border-color: #7F00FF !important;
  text-decoration: none !important;
}

.btn-outline-success:hover {
  color: #fff !important;
  background-color: #7F00FF !important;
  border-color: #7F00FF !important;
  text-decoration: none !important;
}

.btn-outline-success:focus,
.btn-outline-success.focus {
  color: #fff !important;
  background-color: #7F00FF !important;
  border-color: #7F00FF !important;
  box-shadow: 0 0 0 0.2rem rgba(127, 0, 255, 0.25) !important;
}

.btn-outline-success:not(:disabled):not(.disabled):active,
.btn-outline-success:not(:disabled):not(.disabled).active {
  color: #fff !important;
  background-color: #7F00FF !important;
  border-color: #7F00FF !important;
}
