/*
* Main SCSS Entry Point
* This file uses Sass's @use rule to import and bundle all component 
* stylesheets into a single output file.
*/
/* Page-specific overrides for the admin layout */
body, html {
  height: 100%;
}

.admin-container {
  display: flex;
  height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background-color: #f4f4f4;
  padding: 20px;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
}

.sidebar-title {
  font-size: 1.5em;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
  margin-bottom: 5px;
}

.sidebar-menu li a:hover {
  background-color: #e2e2e2;
}

.admin-content {
  flex-grow: 1;
  padding: 40px;
}

/* Responsive Admin Layout */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
    height: auto;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
  }
  .admin-content {
    padding: 20px;
  }
}
/* General body styles */
body, html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
}

/* General header styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #ccc;
}

.header a {
  font-size: 2em;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Responsive Header */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .header-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}
/* === Card Grid Styles === */
.card-container {
  display: grid;
  /* Use the CSS variable set in the HTML, with a fallback */
  grid-template-columns: repeat(var(--grid-columns, 5), 1fr);
  gap: 20px;
  padding: 20px;
}

.card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Responsive Card Grid */
@media (max-width: 1024px) {
  .card-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .card-container {
    grid-template-columns: 1fr;
  }
}
.card-content p {
  margin: 5px 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-control {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.checkbox-group {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 4px;
}

.add-record-container {
  padding: 40px;
}

/* Styles for dropdown in the header */
.header-left-items {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-dropdown .form-control {
  max-width: 250px; /* Keep the dropdown from being too wide */
}

.header-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #555;
}

.header-button button {
  height: 38px; /* Match form control height */
  align-self: center;
}

/* Styles for Add Record page header */
.add-record-identifier {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-icon {
  font-size: 2.5rem;
  font-weight: 300;
  color: #888;
  line-height: 1;
}

/* Styles for drag and drop */
.drag-handle {
  cursor: grab;
  padding-right: 10px;
}

.dragging {
  opacity: 0.5;
}

/* Styles for editor field toggles */
.editor-toggle {
  padding-top: 38px;
}

.editor-label {
  cursor: pointer;
}

/* Styles for public field toggles */
.public-toggle {
  padding-top: 38px;
}

.public-label {
  cursor: pointer;
}

/* Styles for multi-control form rows */
.with-controls {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.mandatory-toggle {
  padding-top: 38px; /* Align with the input box */
}

.mandatory-label {
  cursor: pointer;
}

.slug-source-toggle {
  padding-top: 38px;
}

.field-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column; /* Stack label above input */
}

.generate-slug-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin-top: 8px; /* Add some space below the input */
  align-self: flex-start; /* Align to the start of the container */
}

.form-lock-controls {
  display: flex;
  gap: 30px;
  padding: 0.5rem 0 1rem 0;
  border-bottom: 1px solid #eee;
}

.lock-control-header {
  padding-top: 0; /* Override the padding for header row */
  height: 20px; /* Give it some height to align vertically */
}

.is-mandatory > .field-container > label::after,
.with-controls.is-mandatory .field-container label::after {
  content: " *";
  color: #d9534f; /* Red to indicate mandatory */
  font-weight: bold;
}

.table-controls .form-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.is-greyed-out {
  opacity: 0.5;
  background-color: #f9f9f9;
}

/* Styles for Header Search Bar */
.header-search {
  display: flex;
  justify-content: flex-end;
}

.search-input {
  max-width: 180px; /* Adjust width as needed */
  height: 30px; /* Smaller height for the header */
  font-size: 0.9em;
}

/* Styles for Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}

.close-button {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Styles for GridStack Layout Editor */
.grid-stack-item-content {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  text-align: center;
  font-weight: bold;
  overflow: hidden;
}

/* === Path Stack Styles (Deployment) === */
.path-stack {
  margin-top: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  max-width: 600px;
}

.path-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}
.path-item:last-child {
  border-bottom: none;
}

.delete-source-btn {
  color: #dc3545;
  font-weight: bold;
  cursor: pointer;
  padding: 0 5px;
}
.delete-source-btn:hover {
  color: #a71d2a;
}

/* === Deployment Report Styles === */
.report-item {
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.report-stats {
  list-style: none;
  padding: 0;
  font-size: 0.9em;
  margin-top: 5px;
}

.stat-deleted {
  color: #dc3545;
}

.stat-copied {
  color: #28a745;
}

.stat-preserved {
  color: #007bff;
}

.stat-errors {
  color: red;
  font-weight: bold;
}

.error-detail {
  color: red;
  font-size: 0.8em;
  margin-left: 10px;
}

/* === Deployment Preview Tree === */
.preview-tree {
  list-style: none;
  padding-left: 20px;
}

.preview-item {
  padding: 2px 0;
}
.preview-item.ignored {
  color: #aaa;
  /* text-decoration: line-through; */
}

.delete-target-btn {
  color: #dc3545;
  font-weight: bold;
  cursor: pointer;
  padding: 0 5px;
}
.delete-target-btn:hover {
  color: #a71d2a;
}

/* Styles for the special panel layout, mirroring the admin panel */
.special-container {
  display: flex;
  height: 100vh;
}

.special-sidebar {
  width: 250px;
  background-color: #f4f4f4;
  padding: 20px;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
}

.special-content {
  flex-grow: 1;
  padding: 40px;
}

/* Responsive Special Layout */
@media (max-width: 768px) {
  .special-container {
    flex-direction: column;
    height: auto;
  }
  .special-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
  }
  .special-content {
    padding: 20px;
  }
}
/* === Data Table Styles === */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  background-color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap; /* Prevents text from wrapping */
}

th, td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

thead th {
  background-color: #f7f7f7;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

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

/* Styles for column management UI */
.th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

.col-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  padding: 0 4px;
  color: #888;
}

.col-actions button:hover {
  color: #333;
}

/* Styles for sortable headers */
.sort-link {
  text-decoration: none;
  color: inherit;
}

.sort-indicator {
  color: #007bff;
}

/* Styles for row selection */
.row-selector {
  width: 1%;
  padding-left: 15px;
  padding-right: 15px;
  text-align: center;
}

/* Styles for the floating action bar */
.floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.floating-bar button {
  background-color: #d9534f; /* A shade of red */
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.floating-bar button:hover {
  background-color: #c9302c;
}

/* Styles for the confirmation modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
}

.modal-content h2 {
  margin-top: 0;
}

.delete-summary {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  margin: 20px 0;
  background-color: #f9f9f9;
}

.summary-table {
  width: 100%;
  font-size: 0.9em;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}

.modal-actions button {
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.btn-secondary {
  background-color: #eee;
  border: 1px solid #ccc;
  color: #333;
}

.btn-danger {
  background-color: #d9534f;
  color: white;
}

/* Styles for ID Management column highlighting */
.col-target {
  background-color: #e6f7ff !important; /* Light blue */
  font-weight: bold;
}

.col-source {
  background-color: #fffbe6 !important; /* Light yellow */
}

/* Styles for ID Management page */
.id-management-actions {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.row-duplicate {
  background-color: #ffe6e6 !important; /* Pinkish red */
}

/* === Pagination Styles === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  gap: 1.5rem;
  font-family: sans-serif;
}

.page-link {
  text-decoration: none;
  color: #007bff;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.page-link:hover {
  background-color: #e9ecef;
}

.page-current {
  color: #495057;
  font-weight: bold;
}

.page-link.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.page-link-ellipsis {
  padding: 8px 0;
}

/* === Sticky Header for Details Page === */
.details-page-header {
  position: sticky;
  top: 0;
  z-index: 1020; /* Ensure it's above other content */
  background-color: #ffffff;
  padding: 5px 20px; /* Reduced vertical padding */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Add a subtle shadow */
}

.details-page-header .header-title {
  font-size: 1.2rem; /* Smaller font size for "Back to List" */
}

.details-page-header .header-icon {
  font-size: 1.5rem; /* Slightly smaller icons */
}

.details-page-header .user-profile img {
  width: 32px; /* Smaller profile picture */
}

/* === Record Details Page Layout === */
.details-container {
  width: 70%;
  margin: 2rem auto; /* 15% margin on each side is achieved by 70% width and auto margin */
}

.details-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.details-content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5%; /* Creates space between the 25% and 45% columns */
}

.details-column-small {
  flex: 0 0 25%; /* Takes up 25% of the parent width */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.details-column-large {
  flex: 0 0 65%; /* Takes up the remaining space */
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.details-field {
  line-height: 1.6;
}

.details-label {
  font-weight: bold;
  display: block;
  color: #555;
}

.details-youtube-container {
  margin-top: 3rem;
  width: 100%; /* Spans the full 70% width of its parent, which has the 15% margins */
  display: flex;
  justify-content: center;
}

/* Ensure the youtube container spans the full width when inside the grid */
.details-content-grid .details-youtube-container {
  flex-basis: 100%;
  margin-top: 1rem; /* Adjust top margin for when it's inside the grid */
}

/* Responsive YouTube Embed Container */
.youtube-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.youtube-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Styles for the main image on the details page */
.details-record-image {
  max-width: 100%;
  border-radius: 8px;
}

/* Styles for the public view toggle on the details page */
.details-public-view-toggle {
  padding-top: 1rem;
}

/* === Debug Panel Styles === */
.debug-footer {
  background-color: #222;
  color: #eee;
  padding: 20px;
  margin-top: 40px;
  font-family: monospace;
  font-size: 14px;
}

.debug-footer h3 {
  color: #00ffdd;
  cursor: pointer;
  user-select: none;
}

.debug-content {
  background-color: #333;
  border: 1px solid #444;
  padding: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 800px;
  overflow-y: auto;
  display: none; /* Hidden by default */
}

.debug-content table {
  width: 100%;
  margin-top: 1rem;
  border: 1px solid #555;
}

.debug-content thead {
  background-color: #444;
}

.debug-content th, .debug-content td {
  padding: 8px;
  border-bottom: 1px solid #555;
  text-align: left;
}

/* === Details Page Navigation Footer === */
.details-navigation {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid #eee;
  margin-top: 2rem;
}

.nav-link {
  padding: 0 1rem;
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}

.nav-link.disabled {
  color: #ccc;
  pointer-events: none;
}

/* Responsive Details Page */
@media (max-width: 992px) {
  .details-container {
    width: 90%;
    margin: 1rem auto;
  }
  .details-content-grid {
    flex-direction: column;
    gap: 2rem;
  }
  .details-column-small,
  .details-column-large {
    flex: 0 0 100%;
  }
}

/*# sourceMappingURL=main.css.map */
