/*
* 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;
}

/* 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;
}

/* === 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;
}

.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;
}

/* 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 File Tree in Website Deployment */
.file-tree {
  list-style: none;
  padding-left: 20px;
}

.file-tree-item {
  padding: 2px 0;
}

.file-tree-item label {
  font-weight: normal;
  display: inline;
}

.file-tree-item .icon {
  margin-right: 5px;
}

/* 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;
}

/* === 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;
}

/* Styles for the record details page */
.details-view-container {
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.details-view-container h1 {
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 30px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px 40px;
}

.details-field {
  display: flex;
  flex-direction: column;
}

.details-label {
  font-weight: bold;
  color: #555;
  margin-bottom: 5px;
}

.details-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* Responsive YouTube Embed */
.youtube-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
}

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

/* Styles for the details page navigation */
.details-navigation {
  text-align: center;
  padding: 20px 0 40px 0;
  font-family: sans-serif;
}

.nav-link {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
  padding: 10px;
}

.nav-link:hover {
  text-decoration: underline;
}

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

.nav-separator {
  color: #ccc;
  margin: 0 10px;
}

/* Styles for the debug panel */
.debug-panel {
  margin-top: 50px;
  padding: 20px;
  background-color: #1e1e1e;
  color: #d4d4d4;
  border-top: 5px solid #ff4500;
  font-family: monospace;
}

.debug-panel h2, .debug-panel h3 {
  color: #ff8c00;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.debug-panel pre {
  background-color: #333;
  padding: 10px;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-all;
}

.debug-panel table {
  width: 100%;
}

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