/* Import Root CSS for vars and reset */
@import url("./root.css");

:root {
  --main-theme-color: #ffc107;
  --content-padding: 1rem;
  --main-text-dark-mode: #f1f3f5;
  --main-text-light-mode: var(--text-color);

  --main-bg-light-mode: var(--surface-0);
  --main-bg-dark-mode: #2a323d;

  --content-background-light: #efefef;
  --content-background-dark: #20262e;

  --menu-text-color: #f1f3f5;
  --menu-text-hover-color: rgba(255, 255, 255, 0.04);
  --menu-text-active-color: var(--primary-500);

  --menu-bg-color: #2a323d;
  --menu-header-bg-color: #282f38;
  --submenu-bg-color: #3f4853;
  --main-bg-color: #20262e;

  --rocket-flame-red: #d72638;
  --rocket-flame-red-light: #e05260;
  --rocket-flame-orange: #f47c2f;
  --rocket-flame-orange-dark: #e06c1c;
  --rocket-flame-yellow: #f4d313;
  --rocket-flame-yellow-dark: #d6b80a;
  --dark-night-sky: #1c2230;
  --deep-sky-blue: #2d6ca3;
  --deep-sky-blue-dark: #296497;
  --light-smoke: #e3e5ea;
  --medium-smoke: #65707b;
  --dark-smoke: #343a40;
  --steel-grey: #2f3136;
  --booster-white: #f9fafb;
  --rocket-booster-green: #4eca94;
  --rocket-booster-green-dark: #00a86b;
  --card-radius: 14px;
  --card-border: 1px solid rgba(148, 163, 184, 0.16);
  --card-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --card-shadow-hover: 0 18px 38px rgba(15, 23, 42, 0.12);
  --control-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Global */
.no-display {
  display: none;
}

body {
  font-family:
    "Segoe UI", Roboto, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.5;
  background: linear-gradient(180deg, #f7f9fc 0%, #edf2f7 55%, #e8eef5 100%);
  color: var(--main-text-light-mode);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
h1 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--main-text-light-mode);
}
h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--main-text-light-mode);
}
sup {
  font-size: 0.8rem;
  color: var(--red-400);
}

/* Settings Page Styles */
.settings-section-header {
  margin-bottom: 1rem;
}
.settings-section-header h2 {
  font-weight: 600;
}

.settings-card {
  background-color: var(--surface-200);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--main-text-light-mode);
  font-weight: 500;
}

.email-list {
  margin: 1rem 0;
}

.email-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background-color: var(--surface-300);
  border-radius: var(--border-radius);
}

.email-input-container {
  display: flex;
  gap: 0.5rem;
}

.email-input-container input[type="email"] {
  flex: 1;
  font-size: 1rem;
  color: var(--main-text-light-mode);
  background: var(--main-bg-light-mode);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-600);
  border-radius: 4px;
}

/* Top Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 4rem;
  display: flex;
  color: var(--rocket-flame-orange);
  background-color: var(--dark-night-sky);
  border-bottom: 2px solid var(--deep-sky-blue);
}
.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rocket-flame-orange);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  padding: var(--content-padding);
}

/* Content & Containers */

.content-wrapper {
  margin-left: 220px;
  padding-top: 65px;
  display: flex;
  flex-direction: column;
}
.breadcrumb-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1rem 1.25rem;
  background: rgba(249, 250, 251, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

#main-content {
  flex: 1 1 auto;
  padding: var(--content-padding);
  background-color: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--content-padding);
}

#main-content > div,
#main-content > p,
#main-content > h1,
#main-content > h2,
#main-content > h3,
#main-content > h4,
#main-content > h5,
#main-content > h6 {
  color: var(--main-text-light-mode);
  background-color: var(--surface-card-light);
  border-radius: var(--card-radius);
  border: var(--card-border);
  padding: 1.25rem;
  margin-bottom: 0;
  box-shadow: var(--card-shadow);
}

#content {
  padding: 20px;
}
#menu-bar {
  position: fixed;
  height: calc(100% - 65px);
  top: 65px;
  left: 0;
  width: 220px;
  background: linear-gradient(180deg, var(--dark-smoke) 0%, #2f3439 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 60px; /* Space for fixed logout button */
}

/* Scrollbar styling for sidebar */
#menu-bar::-webkit-scrollbar {
  width: 6px;
}

#menu-bar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

#menu-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

#menu-bar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Menu items base styles */
#menu-bar a,
#menu-bar div {
  display: block;
  padding: 1.25rem 1.25rem;
  color: var(--menu-text-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  position: relative;
  letter-spacing: 0.01em;
}

/* Last menu item (typically logout) */
#menu-bar a:last-child {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 180px;
  font-size: 0.9rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  font-weight: 700;
  color: var(--rocket-flame-orange);
  z-index: 101;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

#menu-bar a:last-child:hover {
  background: linear-gradient(
    180deg,
    rgba(215, 38, 56, 0.2) 0%,
    rgba(215, 38, 56, 0.3) 100%
  );
  color: var(--rocket-flame-red-light);
}

/* Hover states */
#menu-bar a:hover,
#menu-bar a.sub-menu-item:hover {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  padding-left: 1.5rem;
  color: var(--booster-white);
}

/* Active state */
#menu-bar a.active {
  background: linear-gradient(
    90deg,
    rgba(45, 108, 163, 0.25) 0%,
    rgba(45, 108, 163, 0.1) 100%
  );
  border-left: 4px solid var(--deep-sky-blue);
  padding-left: calc(1.25rem - 4px);
  color: var(--booster-white);
  font-weight: 700;
}

#menu-bar a.active::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--deep-sky-blue) 50%,
    transparent 100%
  );
}

#menu-bar a.active:hover {
  background: linear-gradient(
    90deg,
    rgba(45, 108, 163, 0.35) 0%,
    rgba(45, 108, 163, 0.15) 100%
  );
  padding-left: calc(1.5rem - 4px);
}

/* Menu header items */
#menu-bar div.menu-header-item {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-color-secondary);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#menu-bar div.menu-header-item:first-child {
  margin-top: 0;
}

/* Submenu items */
#menu-bar a.sub-menu-item {
  padding-left: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(241, 243, 245, 0.85);
  background: rgba(0, 0, 0, 0.15);
}

#menu-bar a.sub-menu-item::before {
  position: absolute;
  left: 0rem;
  opacity: 0.5;
  transition: all 0.2s ease;
}

#menu-bar a.sub-menu-item:hover::before {
  left: 1.75rem;
  opacity: 1;
}

#menu-bar a.sub-menu-item:hover {
  padding-left: 2.25rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--booster-white);
}

#menu-bar a.sub-menu-item.active {
  background: linear-gradient(
    90deg,
    rgba(45, 108, 163, 0.3) 0%,
    rgba(45, 108, 163, 0.15) 100%
  );
  border-left: 3px solid var(--deep-sky-blue);
  padding-left: calc(2.5rem - 3px);
  color: var(--booster-white);
  font-weight: 600;
}

#menu-bar a.sub-menu-item.active:hover {
  padding-left: calc(2.75rem - 3px);
}

/* Generic Button */
.button,
button:not(.setNowButton) {
  cursor: pointer;
  color: var(--text-color);
  background: var(--rocket-flame-yellow);
  border: 1px solid var(--rocket-flame-yellow);
  padding: 0.625rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: var(--control-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}
button:hover:not(.setNowButton),
.button:hover {
  background: var(--rocket-flame-yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.login.button,
button.login {
  background: var(--deep-sky-blue);
  border: 1px solid var(--deep-sky-blue);
  color: var(--rocket-flame-orange);
  font-weight: 600;
}

.login.button:hover,
button.login:hover {
  background: var(--deep-sky-blue-dark);
}

button.kebab {
  padding: 1px 6px;
}
button.kebab::after {
  content: "⋮";
  font-size: 1.5rem;
}

button.red {
  background: var(--red-500);
  border: 1px solid var(--red-500);
  color: var(--surface-0);
}
button.red:hover {
  background: var(--red-700);
}

button.green {
  background: var(--rocket-booster-green);
  border: 1px solid var(--rocket-booster-green);
  color: var(--surface-0);
}
button.green:hover {
  background: var(--rocket-booster-green-dark);
}

button.grey {
  background: var(--gray-500);
  border: 1px solid var(--gray-500);
  color: var(--surface-0);
}
button.grey:hover {
  background: var(--gray-700);
}

button.blue {
  background: var(--deep-sky-blue);
  border: 1px solid var(--deep-sky-blue);
  color: var(--surface-0);
}
button.blue:hover {
  background: var(--deep-sky-blue-dark);
}

button.purple {
  background: var(--purple-500);
  border: 1px solid var(--purple-500);
  color: var(--surface-0);
}
button.purple:hover {
  background: var(--purple-700);
}

button.transparent {
  background: transparent;
}
button.transparent:hover {
  background: var(--main-theme-color);
}
button.edit::after,
button.add::after {
  margin-left: 5px;
  content: "";
  display: inline-block;
  height: 13px;
  width: 13px;
  background-size: 13px 13px;
  background-repeat: no-repeat;
}
button.edit::after {
  background-image: url("../assets/icons/pencil-edit.svg");
}
button.add::after {
  background-image: url("../assets/icons/plus.svg");
}
button.save::after {
  /* can make this a checkmark or something */
  content: "";
}

td button,
td button:not(.setNowButton) {
  padding: 0.4rem 0.55rem;
}

.bold {
  font-weight: 600;
}

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-toolbar-left {
  justify-content: flex-start;
}

.table-section,
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.content-centered {
  text-align: center;
}

.text-left {
  text-align: left;
}

.mt-lg {
  margin-top: 0.5rem;
}

.surface-muted {
  background-color: var(--surface-100) !important;
}

.empty-state {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-color-secondary);
}

.table-action-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-action-button,
.export-button {
  align-self: flex-end;
}

.icon-button {
  min-width: 2.1rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem !important;
}

.button-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

/* Inputs */
label {
  color: var(--main-text-light-mode);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  font-size: 1rem;
  color: var(--main-text-light-mode);
  background: var(--main-bg-light-mode);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--surface-300);
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
  appearance: none;
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--deep-sky-blue);
  box-shadow: 0 0 0 3px rgba(45, 108, 163, 0.12);
}

/* Table */
table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}
th {
  background-color: var(--surface-50);
  color: var(--text-color-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--surface-300);
  text-align: left;
}
tr {
  height: auto;
  font-size: 0.9rem;
  background-color: var(--surface-0);
  transition: background-color 0.15s ease;
}
td {
  border-right: none;
  white-space: nowrap;
  width: auto;
  font-size: 0.9rem;
  padding: 0.75rem;
  color: var(--text-color);
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--surface-200);
}
table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td {
  padding: 0.75rem !important;
}

tbody tr:hover {
  background-color: #f8fbff;
}

div.dt-container {
  width: 100%;
  overflow-x: auto;
}

div.dt-container .dt-layout-row {
  gap: 1rem;
  margin: 0 0 1rem;
}

div.dt-container .dt-search,
div.dt-container .dt-length,
div.dt-container .dt-info,
div.dt-container .dt-paging {
  color: var(--text-color-secondary);
  font-size: 0.9rem;
}

div.dt-container .dt-search input,
div.dt-container .dt-length select {
  min-height: 2.6rem;
  margin-left: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--surface-300);
  border-radius: 8px;
  background: var(--surface-0);
  color: var(--text-color);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

div.dt-container .dt-search input:focus,
div.dt-container .dt-length select:focus {
  outline: none;
  border-color: var(--deep-sky-blue);
  box-shadow: 0 0 0 3px rgba(45, 108, 163, 0.12);
}

div.dt-container .dt-paging .dt-paging-button {
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--text-color) !important;
  padding: 0.45rem 0.8rem !important;
  box-shadow: none !important;
}

div.dt-container .dt-paging .dt-paging-button:hover {
  background: var(--surface-100) !important;
  border-color: var(--surface-300) !important;
  color: var(--text-color) !important;
}

div.dt-container .dt-paging .dt-paging-button.current {
  background: var(--deep-sky-blue) !important;
  border-color: var(--deep-sky-blue) !important;
  color: var(--booster-white) !important;
}

div.dt-container .dt-paging .dt-paging-button.disabled {
  opacity: 0.45;
}

table button,
table .buy-now-button,
table .archive-button {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
}

table .buy-now-button {
  color: var(--surface-0);
  background: var(--rocket-booster-green-dark);
  border: 1px solid var(--rocket-booster-green-dark);
  white-space: nowrap;
  text-align: center;
}
table .buy-now-button:hover {
  background: var(--green-700);
  color: var(--surface-0);
}

.archive-button {
  background: var(--rocket-flame-red-light) !important;
  border: 1px solid var(--rocket-flame-red-light) !important;
  color: var(--surface-0) !important;
}

.archive-button:hover {
  background: var(--rocket-flame-red) !important;
}

.mark-paid-button {
  background: var(--rocket-booster-green) !important;
  border: 1px solid var(--rocket-booster-green) !important;
}
.mark-paid-button:hover {
  background: var(--rocket-booster-green-dark) !important;
}

.pdf-button {
  background: var(--deep-sky-blue) !important;
  border: 1px solid var(--deep-sky-blue) !important;
  color: var(--booster-white) !important;
}

.pdf-button:hover {
  background: var(--deep-sky-blue-dark) !important;
}

/* Locations Page */

/* ... details expaner */
.location-section,
.dealership-section {
  /* padding: 10px; */
  margin: 0 auto;
  position: relative;
  font-size: 18px;
  transition: all 0.3s;
  box-shadow:
    0 4px 10px #00000008,
    0 0 2px #0000000f,
    0 2px 6px #0000001f !important;
  margin-bottom: 20px;
}
.location-header,
.dealership-header {
  background: var(--surface-100);
  padding: 10px;
  display: grid;
  grid-template-columns: 30% 40% 30%;

  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}
details + details {
  margin-top: 20px;
}
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
}
details summary::before {
  content: "►";
  position: relative;
  margin-right: 10px;
  transition: 0.3s linear;
}
details[open] summary::before {
  content: "▼";
  position: relative;
  margin-right: 10px;
  transition: 0.3s linear;
}
details summary button {
  margin-left: auto;
}
.email-delay {
  align-self: last baseline;
  font-size: 16px;
}
.email-delay input {
  width: 50px;
  margin-left: 10px;
}

/* Contact stuff in the location-section */
.location-section,
.dealership-section {
  border-bottom: 1px solid var(--surface-border-light);
  box-shadow:
    0 4px 10px #00000008,
    0 0 2px #0000000f,
    0 2px 6px #0000001f !important;
}
.location-section:last-child,
.dealership-section:last-child {
  border-bottom: none;
}
.dealership-settings input {
  padding: 0.25rem 0.5rem;
}
.contact-section,
.profiles-section,
.dealership-settings {
  padding: 10px;
  /* margin-bottom: 10px; */
}
.contact-box-container,
.profile-box-container {
  padding-top: 10px;
  padding-left: 10px;
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  align-items: baseline;
}
.contact-box-container,
.profile-box-container {
  border-bottom: 1px solid var(--surface-border-light);
}
.contact-box-container:last-child,
.profile-box-container:last-child {
  border-bottom: none;
}
.contact-box-info label,
.profile-box-info label {
  margin-right: 5px;
  font-weight: 500;
}
.contact-box-info span,
.profile-box-info span {
  margin-right: 10px;
}
.contact-box-buttons button,
.profile-box-buttons button {
  margin-left: 5px;
}

.kebab-menu {
  margin-left: auto;
}

.kebab-menu ul {
  cursor: pointer;
}

.kebab-menu .dropdown {
  /* margin: 10px; */
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 5px;
  background: var(--surface-0);
  position: absolute;
  right: 0;
  /* top: 3em; */
  transition: all 0.15s ease-out;
  transform-origin: 100% 0;
  box-shadow:
    0 2px 4px 0 rgba(0, 0, 0, 0.16),
    0 2px 8px 0 rgba(0, 0, 0, 0.12);
  transform: scale(0);
}

.kebab-menu .dropdown.active {
  transform: scale(1);
}

.kebab-menu .dropdown li {
  list-style: none;
}
.kebab-menu .dropdown li a {
  text-decoration: none;
  padding: 5px 10px;
  display: block;
  width: 100%;
  color: var(--main-text-light-mode);
}
.kebab-menu .dropdown li:hover {
  background-color: var(--surface-300);
}

#createLocationWrapper {
  display: none;
}
#createLocationForm button {
  margin-left: 5px;
}
/* For loading */
#spinnerContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#spinnerContent {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#spinner {
  border: 5px solid var(--light-smoke);
  border-top: 5px solid var(--rocket-flame-orange);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}
#spinnerMessage {
  color: var(--booster-white);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  max-width: 300px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* For error dialog */
#errorDialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

#errorDialog div {
  background: var(--booster-white);
  padding: 20px;
  border-radius: 5px;
}

#userNameContainer {
  position: fixed;
  right: 0;
  padding: 22px;
}
.export-button {
  float: none;
  margin-bottom: 0;
}

.search-box {
  width: 100%;
  max-width: 320px;
}

.location-card {
  background-color: var(--surface-0);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
}

.location-card .location-header {
  margin-bottom: 1rem;
  padding: 0;
  background: transparent;
  border: none;
  display: block;
}

.location-card .location-header h2 {
  margin: 0;
}

.location-details {
  margin: 1rem 0;
  line-height: 1.6;
}

.location-details div + div {
  margin-top: 0.5rem;
}

.contacts-section {
  border-top: 1px solid var(--surface-200);
  padding-top: 1rem;
  margin-top: 1rem;
}

.contact-card {
  background-color: var(--surface-50);
  border: 1px solid var(--surface-200);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
  border-radius: 10px;
}
/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
#menu-toggle {
  display: none;
}

/* Media query for screens less than 768px */
@media (max-width: 768px) {
  #menu-bar {
    display: none;
  }

  .content-wrapper {
    margin-left: 0;
  }

  .breadcrumb-container {
    align-items: flex-start;
    flex-direction: column;
  }

  #main-content {
    padding: 0.75rem;
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .bulk-action-button,
  .export-button {
    align-self: stretch;
    width: 100%;
  }

  .table-action-group {
    flex-direction: column;
    align-items: stretch;
  }

  div.dt-container .dt-layout-row {
    flex-direction: column;
    align-items: flex-start !important;
  }

  div.dt-container .dt-search input,
  div.dt-container .dt-length select,
  .search-box {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  #userNameContainer {
    display: none;
  }

  #menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    left: 15px;
    z-index: 1001;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--menu-text-color);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
  }

  #menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
  }

  #menu-toggle.active {
    background: var(--deep-sky-blue);
    border-color: var(--deep-sky-blue);
    color: var(--booster-white);
  }

  #menu-toggle.active + #menu-bar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 65px;
    left: 0;
    width: 260px;
    height: calc(100% - 65px);
    background: linear-gradient(180deg, var(--dark-smoke) 0%, #2f3439 100%);
    z-index: 1000;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.3s ease;
    padding-bottom: 60px; /* Space for fixed logout button */
  }

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

  #menu-toggle.active + #menu-bar a {
    display: inline-block;
    padding: 1.25rem 1.25rem;
    color: var(--menu-text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 600;
    font-size: 1rem;
  }

  #menu-toggle.active + #menu-bar a:last-child {
    width: 260px;
    left: 0;
    z-index: 1001;
  }

  .header-logo {
    margin-left: auto;
    margin-right: 15px;
  }

  .header-logo span {
    display: none;
  }
}

/* View purchase history link */
.view-history-link {
  color: var(--primary-500);
  text-decoration: none;
  font-weight: 500;
  margin-top: -10px;
  display: inline-block;
  transition: color 0.2s;
}

.view-history-link:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.view-history-link:visited {
  color: var(--primary-500);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-left: 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-400);
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--rocket-booster-green);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.toggle-container {
  display: inline-flex;
  align-items: center;
  margin-left: 20px;
}

/* DataTables Responsive Control Column */
table.dataTable tr th:first-child,
table.dataTable tr td:first-child {
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  padding: 0.25rem !important;
}

.dtr-control {
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  padding: 0.25rem !important;
  text-align: center;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
  background-color: var(--deep-sky-blue) !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(45, 108, 163, 0.25);
}

table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > th.dtr-control:before {
  background-color: var(--rocket-flame-orange) !important;
}

/* Ensure checkbox and action columns are always visible */
.checkbox-column.always-visible,
.action-column.always-visible {
  display: table-cell !important;
}

/* Set appropriate widths for checkbox and action columns */
.checkbox-column.always-visible {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  text-align: center;
}

.action-column.always-visible {
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  text-align: center;
}

/* Custom Dialog Styles */
.custom-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.custom-dialog-content {
  background: var(--booster-white);
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
}

.custom-dialog-header {
  padding: 15px 20px;
  background: var(--surface-100);
  border-bottom: 1px solid var(--surface-300);
}

.custom-dialog-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.custom-dialog-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.custom-dialog-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--surface-300);
}
