/* All apps for the admin panel */

a.section {
  text-transform: uppercase;
}

/* ─── Groups checkbox list — toggle switch style ─────────────────────────── */
ul.admin-groups-checkbox,
.admin-groups-checkbox {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

ul.admin-groups-checkbox li,
.admin-groups-checkbox li {
  padding: 0;
}

/* Label = flex row: [toggle pill] [group name] */
ul.admin-groups-checkbox label,
.admin-groups-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: inherit;
}

/* The <input> IS the toggle pill — hide native appearance */
ul.admin-groups-checkbox input[type="checkbox"],
.admin-groups-checkbox input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 2.25rem;   /* 36px track width */
  height: 1.25rem;  /* 20px track height */
  border-radius: 9999px;
  background: #4b5563;        /* unchecked — grey */
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

/* Knob via ::before on the input */
ul.admin-groups-checkbox input[type="checkbox"]::before,
.admin-groups-checkbox input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.18rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: left 0.2s ease;
}

/* Checked — green track */
ul.admin-groups-checkbox input[type="checkbox"]:checked,
.admin-groups-checkbox input[type="checkbox"]:checked {
  background: #22c55e;
}

/* Checked — knob slides right */
ul.admin-groups-checkbox input[type="checkbox"]:checked::before,
.admin-groups-checkbox input[type="checkbox"]:checked::before {
  left: calc(2.25rem - 0.875rem - 0.18rem);
}
/* ─────────────────────────────────────────────────────────────────────────── */

a.block.font-semibold.mb-2.mt-4.text-font-important-light.text-sm.truncate.dark\:text-font-important-dark {
  text-transform: uppercase;
}

/* Hide Return to site button */
a.flex.font-medium.items-center.text-sm.text-primary-600.dark\:text-primary-500 {
  visibility: hidden;
}

/* Capitalize Language List */
form[action="/i18n/setlang/"] button[type="submit"] {
  text-transform: capitalize;
}

/* IMPORT EXPORT BUTTONS */
.object-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.import_link,
.export_link {
  background-color: #4caf50; /* Green */
  border: none;
  color: white;
  padding: 8px 15px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
}

.import_link {
  background-color: #6c5dd3; /* Blue */
  margin: 5px;
}

.export_link {
  background-color: #ff7e67; /* Orange */
}

.import_link:hover {
  background-color: #1e88e5;
}

.export_link:hover {
  background-color: #e67e22;
}

/* Logo Size */
[href*="/admin/"] img.h-8 {
  height: 5rem !important;
}

/* ─── Admin Button Loader ─────────────────────────────────────────────────── */

/* Spinner keyframe */
@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

/* The spinner element injected into buttons */
.admin-btn-spinner {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.45em;
  vertical-align: middle;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: admin-spin 0.65s linear infinite;
  flex-shrink: 0;
}

/* Button state while loading */
.admin-btn--loading {
  opacity: 0.75;
  cursor: not-allowed !important;
  pointer-events: none;
  position: relative;
}

/* Wrapper injected around <input type="submit"> elements */
.admin-btn-input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

/* Prevent double-click flash on any disabled submit */
button[type="submit"]:disabled,
input[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}
/* ─────────────────────────────────────────────────────────────────────────── */
