/*
  Wild Goose admin CSS
  ---------------------------------------------------------------------------
  LOCKED — left nav (#nav-sidebar). Do NOT change until user explicitly unlocks.
  See .cursor/rules/admin-nav-locked.mdc
  ---------------------------------------------------------------------------
*/
#nav-sidebar {
  flex: 0 0 190px;
}

.main.shifted > #nav-sidebar + .content {
  max-width: calc(100% - 213px); /* 190px nav + 23px toggle */
}

/* Content ↔ filters gap matches content padding-left (40px) */
#changelist-filter {
  margin-left: 40px;
}

/*
  Rights List: fit all columns into the remaining viewport width.
  Only touches the center table — not the locked nav.
*/
body.app-catalog.model-rightslisttitle #changelist {
  min-width: 0;
}

body.app-catalog.model-rightslisttitle #changelist .changelist-form-container {
  min-width: 0;
  flex: 1 1 auto;
}

body.app-catalog.model-rightslisttitle #changelist-form .results {
  overflow-x: auto;
  max-width: 100%;
}

body.app-catalog.model-rightslisttitle #changelist #result_list {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th,
body.app-catalog.model-rightslisttitle #changelist #result_list td {
  padding: 4px 4px;
  font-size: 0.78rem;
  vertical-align: top;
  box-sizing: border-box;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.action-checkbox-column,
body.app-catalog.model-rightslisttitle #changelist #result_list td.action-checkbox {
  width: 2%;
  text-align: center;
  white-space: nowrap;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-titulo,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-titulo,
body.app-catalog.model-rightslisttitle #changelist #result_list tbody th.field-titulo {
  width: 14%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

body.app-catalog.model-rightslisttitle #changelist #result_list tbody th.field-titulo a {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-title_1_display,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-title_1_display {
  width: 10%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-id_autor,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-id_autor {
  width: 10%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-rights_available,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-rights_available {
  width: 15%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-state,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-state {
  width: 9%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.3;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-orden,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-orden {
  width: 5%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-activo,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-activo,
body.app-catalog.model-rightslisttitle #changelist #result_list th.column-pitch_enabled,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-pitch_enabled,
body.app-catalog.model-rightslisttitle #changelist #result_list th.column-drawings_enabled,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-drawings_enabled {
  width: 5%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

body.app-catalog.model-rightslisttitle #changelist #result_list th.column-move_link,
body.app-catalog.model-rightslisttitle #changelist #result_list td.field-move_link {
  width: 12%;
  white-space: nowrap;
  vertical-align: middle;
}

body.app-catalog.model-rightslisttitle #changelist #result_list td.field-move_link .button {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

body.app-catalog.model-rightslisttitle #changelist #result_list input.vIntegerField {
  width: 2.75rem;
  max-width: 100%;
  box-sizing: border-box;
}

body.app-catalog.model-rightslisttitle #changelist #result_list input[type="checkbox"] {
  margin: 0;
}

/* Slightly narrower filters on this list so the table gets more room */
body.app-catalog.model-rightslisttitle #changelist-filter {
  flex: 0 0 160px;
  width: 160px;
  font-size: 0.75rem;
}

.wg-show-password {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 28rem;
}

.wg-show-password input {
  flex: 1;
  min-width: 0;
}

.wg-show-password-toggle {
  flex-shrink: 0;
  border: 1px solid var(--border-color, #ccc);
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  background: var(--body-bg, #fff);
  color: var(--body-fg, #333);
  font-size: 0.8125rem;
  cursor: pointer;
}

.wg-show-password-toggle:hover {
  background: var(--darkened-bg, #f5f5f5);
}

.wg-meeting-slots-admin-banner {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #c8d4c8;
  border-radius: 4px;
  background: #f6f8f6;
}

.wg-meeting-slots-admin-banner__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.wg-meeting-slots-admin-banner__text {
  margin: 0 0 0.65rem;
  color: #445;
  font-size: 0.88rem;
  line-height: 1.45;
}

.wg-meeting-slots-admin-banner__link {
  font-weight: 600;
  text-decoration: none;
}

.wg-meeting-slots-admin-banner__link:hover {
  text-decoration: underline;
}

.wg-admin-photo-preview {
  display: block;
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.inline-group .wg-admin-photo-preview {
  max-width: 72px;
  max-height: 72px;
}

.wg-admin-media-preview {
  display: block;
  max-width: 220px;
  max-height: 72px;
}

.wg-admin-image-modal[hidden] {
  display: none !important;
}

.wg-admin-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wg-admin-image-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(10, 14, 12, 0.78);
}

.wg-admin-image-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 900px);
  max-height: 90vh;
  padding: 1.25rem;
  background: #fffef9;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.wg-admin-image-modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #102018;
  color: #f7f4ee;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.wg-admin-image-modal-close:hover {
  background: #1a3024;
}

.wg-admin-image-modal-dialog img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 3rem);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

body.wg-admin-image-modal-open {
  overflow: hidden;
}
