/* General styles for other page elements */

/* ── Standard page-level heading (single source of truth) ── */
.page-heading {
  color: #0077B6;
  font-size: 1.8rem;
  font-weight: bold;
  text-align: center;
  margin: 20px 0 16px;
  padding: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: #0077B6;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
}

h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.75em;
}

h3 {
  font-size: 1.5em;
}

h4 {
  font-size: 1.25em;
}

h5 {
  font-size: 1.1em;
}

h6 {
  font-size: 1em;
}

/* Paragraphs */
p {
  font-size: 1em;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Links */
a {
  color: #0077B6;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover, a:focus {
  color: #0096C7;
  text-decoration: underline;
}

/* Buttons */
button, input[type="button"], input[type="submit"] {
  background-color: #0077B6;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover, input[type="button"]:hover, input[type="submit"]:hover {
  background-color: #0096C7;
}

/* Form Inputs */
input, textarea, select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  font-size: 1em;
}

input:focus, textarea:focus, select:focus {
  border-color: #0077B6;
  outline: none;
}

body {
  padding-top: 60px; /* Adjust this value based on the actual height of your .menu */
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th {
  background-color: #0077B6;
  color: white;
  padding: 20px 10px;
  font-weight: bold;
  text-align: left;
  border-bottom: 2px solid #0096C7;
}

thead th {
  position: sticky;
  background-color: #0077B6;
  z-index: 10;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

tr {
  background-color: #f9f9f9;
}

tr:nth-child(even) {
  background-color: #e9e9e9;
}

tr:hover, tr:nth-child(even):hover {
  background-color: #838383;
}

/* Styled dropdown */
.styled-dropdown {
  width: 300px;
  padding: 10px;
  border: 1px solid #0077B6;
  border-radius: 5px;
  font-size: 1em;
  background-color: #f9f9f9;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.styled-dropdown::-webkit-inner-spin-button,
.styled-dropdown::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.styled-dropdown::-webkit-calendar-picker-indicator {
  color: #333;
}

/* Sorting arrows */
.sorting::after {
  content: ""; 
}

.sorting_asc::after {
  content: "\25B2"; 
  opacity: 1;
}

.sorting_desc::after {
  content: "\25BC"; 
  opacity: 1;
}


/* Sections */
.section {
  margin: 20px auto;
  width: 90%;
  max-width: none;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border: 1px solid #e0e0e0;
}

.section h2 {
  color: #0077B6;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.section p {
  margin-bottom: 20px;
  color: #333;
}

/* Buttons */
.add-collection-btn, .create-from-prebuilt-btn {
  margin-top: 10px;
  font-size: 1em;
  padding: 10px 20px;
}

/* Form section */
.form-section {
  display: flex;
  flex-direction: column;
}

.form-section label {
  margin-bottom: 5px;
}

.form-section select, 
.form-section input[type="text"] {
  margin-bottom: 20px;
}

/* Alerts */
.alert {
  color: red;
  border: 1px solid;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  background-color: #f8d7da;
}

/* Fix table overflow and container padding */
.table-wrapper {
  overflow-x: auto;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

/* Optional: prevent squishing on narrow screens */
.table-wrapper table {
  min-width: 1000px;
}

.tab-card {
  margin-top: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #d8dee6;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tab-button {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  color: #1f2933;
}

.tab-button.is-active {
  background: #2563eb;
  color: #fff;
}

.tab-panel {
  display: none;
  padding: 16px;
}

.tab-panel.is-active {
  display: block;
}

.tab-panel-body {
  margin-top: 16px;
}

.empty-state {
  margin: 8px 0 0;
  color: #5f6b7a;
}

.document-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.equipment-group-details summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-weight: 700;
}

.equipment-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.75rem;
  background-color: rgba(148, 163, 184, 0.2);
}

.equipment-plus.has-items {
  color: #1d4ed8;
  background-color: rgba(29, 78, 216, 0.15);
}

.equipment-plus.no-items {
  color: #9ca3af;
}

.equipment-group-details[open] summary {
  margin-bottom: 10px;
}

.equipment-group-details .group-meta {
  font-weight: 600;
  color: #5f6b7a;
}

.equipment-detail-body {
  padding-bottom: 8px;
}

.document-list a {
  text-decoration: none;
  color: #1d4ed8;
  font-weight: 600;
}

.child-table img {
  max-width: 90px;
  border-radius: 4px;
  display: block;
}

.child-table td {
  vertical-align: top;
}

.child-table-primary {
  font-weight: 600;
}

.inline-field {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.edit-btn,
.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9em;
}

.edit-btn {
  background-color: #e3f2fd;
  color: #0d47a1;
}

.delete-btn {
  background-color: #ffebee;
  color: #b71c1c;
  margin-left: 6px;
}

/* ── Form layout ── */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.readonly-field {
  background-color: #eee;
  cursor: not-allowed;
}

/* ── Table action link-buttons ── */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.action-buttons a {
  padding: 5px 10px;
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 0;
}

.btn-edit {
  background-color: #3498db;
  color: white;
}

.btn-edit:hover {
  background-color: #2980b9;
  color: white;
  text-decoration: none;
}

.btn-delete {
  background-color: #e74c3c;
  color: white;
}

.btn-delete:hover {
  background-color: #c0392b;
  color: white;
  text-decoration: none;
}

/* ── Link styled as add-action button ── */
a.button {
  display: inline-block;
  padding: 8px 12px;
  background-color: #0077B6;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 0.95em;
}

a.button:hover {
  background-color: #0096C7;
  color: white;
  text-decoration: none;
}
