@charset "UTF-8";

/* =============================================================================
  TOKENS
  Color tokens live in color.css (imported by style.css).
============================================================================= */
:root{
  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Spectral", ui-serif, Georgia, "Times New Roman", Times, serif;
}

/* =============================================================================
  BASE
============================================================================= */
html{
  color-scheme: light;
}

body{
  /* font-family: ; */
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  background-color: var(--surface);
  color: var(--text);
  overflow: hidden;
}

/* JS is enabled */
html.js .flash-stack { display: block; }

/* Toasts were actually displayed, so hide the HTML fallback */
html.js-toasts .flash-stack { display: none; }

/* Password info box toggle */
html.js .password-info { display:none; }
html.js .password-info.is-open { display:block; }

/* Links */
a{
  color: var(--gray);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease, transform .08s ease;
}

a:visited{
  color: var(--muted);
}

a:hover{
  color: var(--black);
  /* text-decoration: underline; */
  text-underline-offset: 3px;
}

a:focus-visible{
  outline: none;
  border-radius: 6px;
}

/* Shared sortable table headers. Also usable on a <button> (client-side
   sort, see inc.table_sort_header_client.tpl): the reset properties below
   are no-ops on an <a> but strip default button chrome. */
.table-sort-link,
.table-sort-link:visited{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.table-sort-link i{
  width: 1em;
  flex: 0 0 1em;
  text-align: center;
}

.table-sort-link:hover{
  color: var(--link);
}

.table-sort-link:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Horizontal rule */
hr{
  clear: both;
  border: 0;
  border-top: 1px solid var(--border);
}

/* Utility classes */
.hide{ display:none; }
.show{ display:block; }
.clearfix::after{
  content: "";
  display: table;
  clear: both;
}

/* Alerts */
.alert{clear: both; min-height: 55px; padding: 10px 15px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent;}
.alert p{margin-bottom: 0;}

/* Password info box toggle */
.password-info { display: none; }
.password-info.is-open { display: block; }

/* Hidden class */
.is-hidden { display: none; }

/* =============================================================================
  FLASH MESSAGES
============================================================================= */

.flash-stack {
  margin: 12px 0;
  display: grid;
  gap: 10px;
}

.flash {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
}

.flash-text {
  white-space: pre-line;
}

.flash-heading {
  font-weight: 600;
  margin-bottom: 4px;
}

.flash-success { background: var(--flash-success-bg); border-color: var(--flash-success-border); }
.flash-info    { background: var(--flash-info-bg); border-color: var(--flash-info-border); }
.flash-warning { background: var(--flash-warning-bg); border-color: var(--flash-warning-border); }
.flash-error   { background: var(--flash-error-bg); border-color: var(--flash-error-border); }

/* =============================================================================
  TOASTS (using jQuery Toast Plugin)
============================================================================= */
.jq-toast-single.toast-success { background-color: var(--toast-success-bg) !important; color: var(--toast-success-text) !important; }
.jq-toast-single.toast-info    { background-color: var(--toast-info-bg) !important; color: var(--toast-info-text) !important; }
.jq-toast-single.toast-warning { background-color: var(--toast-warning-bg) !important; color: var(--toast-warning-text) !important; }
.jq-toast-single.toast-error   { background-color: var(--toast-error-bg) !important; color: var(--toast-error-text) !important; }

/* ==========================================================================
   Mobile menu
   ========================================================================== */

/* ----------------------------
   Overlay
---------------------------- */
.nav-overlay{
  position: fixed;
  inset: 0;
  background: var(--overlay-45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 999;
}

body.is-nav-open .nav-overlay{
  opacity: 1;
  pointer-events: auto;
}

/* =============================================================================
  Language select
============================================================================= */

.lang-select{
  position:relative;
  display:inline-block;
}

.lang-select__btn{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
}

.lang-select__menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  min-width:100%;
  z-index:1000;
  background:var(--surface);
  border:1px solid var(--gray-light);
  border-radius:10px;
  padding:6px;
  box-shadow:0 10px 30px var(--overlay-12);
}

.lang-select__flag{
  width:22px;
  height:15px;

  display:inline-block;
  flex:0 0 22px;

  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;

  border-radius:3px;
  box-shadow:inset 0 0 0 1px var(--overlay-08);
}

.lang-select__text{
  min-width:24px;
  text-transform:uppercase;
  font-weight:500;
}

.lang-select__chev{
  margin-left:auto;
  opacity:.6;
}

.lang-select__item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;

  padding:8px 10px;
  border:0;
  background:transparent;
  text-align:left;
  border-radius:8px;
  cursor:pointer;
}

.lang-select__item:hover{
  background:var(--overlay-05);
}

/* The closed button only ever shows the short language code, so size it to
   content instead of reserving width for a label it never displays. */
.lang-select[data-flag-base]{
  width:auto;
  max-width:100%;
  min-width:0;
}

.lang-select[data-flag-base] .lang-select__btn{
  box-sizing:border-box;
  width:auto;
  min-width:0;
}

/* The menu sizes to its widest option (not the closed button's possibly
   shorter code), and options fill that width so they don't wrap. */
.lang-select[data-flag-base] .lang-select__menu{
  box-sizing:border-box;
  width:max-content;
  min-width:100%;
}

.lang-select[data-flag-base] .lang-select__item{
  box-sizing:border-box;
  width:100%;
  min-width:0;
}

.lang-select[data-flag-base] .lang-select__text{
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:start;
}

/* =============================================================================
  LAYOUT WRAPPER
============================================================================= */
.container{
  position: relative;
  max-width: 1300px;
  margin: 20px auto;
  padding: 10px;
  background-color: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 1;
}

/* ==========================================================================
   Base / common
   ========================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  background-color: var(--scrim);
  color: var(--surface);
}

/* <div id="confetti"></div> */
#confetti {
  position: fixed;
  inset: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
}

.editor-block {
  margin-top: 2em;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.pagination a {
  text-decoration: none;
  color: var(--link);
  font-size: 14px;
}

.pagination span {
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   Members area
   ========================================================================== */

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--overlay-06);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.user-name {
  font-weight: 600;
}

.user-id {
  font-size: 12px;
  opacity: .65;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--overlay-06);
  font-size: 13px;
}

.badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--black);
  background: var(--overlay-08);
  font-size: 12px;
  -webkit-border-radius: 999px;
  -moz-border-radius: 999px;
  -ms-border-radius: 999px;
  -o-border-radius: 999px;
}

.badge.system {
  background: var(--badge-system);
}

.badge.custom {
  background: var(--badge-custom);
}

tr.is-me {
  background: var(--overlay-03);
}

.mobile-hide {
  display: table-cell;
}

@media (max-width: 700px) {
  .mobile-hide { display: none; }
}

/* =============================================================================
  TABS
============================================================================= */

.tabs {
  margin-top: 1rem;
}

/* .tabs .tabs-panel{
  margin: 0 auto;
} */

.tabs-nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 1px solid var(--overlay-12);
  margin-bottom: 1rem;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: .75rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  opacity: .8;
}

.tab.is-active {
  opacity: 1;
  border-bottom-color: currentColor;
  font-weight: 600;
}

.tabs-panel {
  display: none;
}

.tabs-panel.is-active {
  display: block;
}

/* =============================================================================
  PROFILE TABS WIDTH (centered, 40em)
============================================================================= */

/* IMPORTANT: inside tabs, let profile forms be 100% (no extra max-width/margins) */
.tabs[data-tabs] form.profile{
  max-width: none;
}

/* Keep spacing between stacked forms */
.tabs[data-tabs] .card form.profile + form.profile{
  margin-top: 1rem;
}

/* Responsive padding */
@media (max-width: 42em){
  .tabs[data-tabs]{
    max-width: 100%;
    padding: 0 1rem;
  }
}

/* =============================================================================
  FORMS (generic)
============================================================================= */
input,
textarea,
select{
  font: inherit;
}

button.input-invalid,
input[type="text"].input-invalid,
input[type="email"].input-invalid,
input[type="password"].input-invalid,
select.input-invalid,
textarea.input-invalid{
  border: 1px solid var(--err) !important;
}

input[type="checkbox"].input-invalid{
  box-shadow: 0 0 0 1px var(--red);
}

div.input-block label:not(.toggle) {
	position: absolute;
	top: -16px;
	left: 10px;
	color: var(--icon-gray);
	font-size: 0.8rem;
	transition: all 0.2s;
	transform-origin: 0% 0%;
	background: none;
	pointer-events: none;
}
div.input-block input::placeholder {
	color: var(--muted);
}
div.input-block input:valid + label,
div.input-block input:focus + label {
	transform: scale(0.8) translateY(-30px);
	background: var(--white);
}
div.input-block label.on {
	transition: all .3s ease-in-out;
	float: right;
	-webkit-transition: all .3s ease-in-out;
	-moz-transition: all .3s ease-in-out;
	-ms-transition: all .3s ease-in-out;
	-o-transition: all .3s ease-in-out;
}
div.info-link {
  font-size: 0.9rem;
}
div.info-link a {
  float: right;
}

/* ------------------------------------------------------------
   Forms (inputs: all types)
------------------------------------------------------------ */

/*form{ margin: 0; }*/

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="file"],
select,
textarea{
  /* width: 100%; */
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 10px;
  font-size: 1rem;
  line-height: 1.35;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  -webkit-transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  -moz-transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  -ms-transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
  -o-transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}

textarea{
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus{
  border-color: var(--focus);
  box-shadow: 0 0 0 4px var(--focus-soft);
}

input:disabled,
select:disabled,
textarea:disabled{
  opacity: .6;
  cursor: not-allowed;
  background: var(--surface-hover);
}

.admin-form-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* =============================================================================
  RADIO PILL OPTIONS (STYLE YOUR RADIO INPUTS AS PILL BUTTONS)
============================================================================= */
.radio-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .6rem;
  border: 1px solid var(--overlay-15);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.radio-pill input {
  margin: 0;
}

.card {
  --bs-card-border-width: 0;
}

.card-body {
  padding: 0;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--border);
}

.field-with-pill {
  position: relative;
  display: block;
  overflow: visible; /* IMPORTANT: prevents tooltip clipping */
}

.field-input {
  width: 100%;
  padding-right: 44px; /* room for the pill */
}

.field-pill {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  width: 26px;
  height: 26px;
  border-radius: 999px;

  border: 1px solid var(--border);
  background: var(--overlay-04);
  color: var(--overlay-75);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: default;
  padding: 0;
}

.field-pill:focus {
  outline: 2px solid var(--overlay-18);
  outline-offset: 2px;
}

/* The global button:active translateY(1px) would replace the centering
   transform and make the pill drop on click. */
.field-pill:active {
  transform: translateY(-50%);
}

/* The pill's transform makes it a stacking context, so its tooltip's own
   z-index cannot escape it: lift the pill above the following
   .input-block siblings (position: relative) while the tooltip is shown. */
.field-pill:hover,
.field-pill:focus,
.field-pill:focus-visible {
  z-index: 30;
}


/* ------------------------------------------------------------
   Buttons (single source of truth)
------------------------------------------------------------ */

.btn,
button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.btn:active,
button:active{
  transform: translateY(1px);
}

.btn:disabled,
.btn.is-disabled,
button:disabled{
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  color: var(--black);
  background-color: var(--surface-disabled);
  border-color: var(--border);
}

.btn:hover,
button:hover{
  /* background: var(--muted);
  color: var(--surface); */
  border-color: var(--border-strong);
}

.btn-small{
  padding: 6px 10px;
  font-size: 13px;
}

/* Primary */
/* .btn-primary{
  border-color: var(--link);
  background: var(--link);
  color: var(--surface);
} */

.btn-primary:hover{
  background: var(--link);
  border-color: var(--link);
  color: var(--surface);
}

/* Danger (subtle) */
.btn-danger{
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover{
  background: var(--danger-hover);;
}

/* Link-like action (admin actions) */
.btn-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--link);
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover{
  background: var(--overlay-05);
  color: var(--link-hover);
}

.btn-link.danger{ opacity: .95; }
.btn-link.danger:hover{ color: var(--danger); }

/* Icon-only */
.icon-btn{
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.icon-btn svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.icon-btn:hover{ background: var(--overlay-06); }
.icon-btn.danger:hover{ background: var(--red-soft); }

.icon-btn:disabled,
.icon-btn.is-disabled{
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ------------------------------------------------------------
   Tables
------------------------------------------------------------ */

.admin-table-wrap{ overflow-x: auto; }

/* Below this width, let the table keep its natural (content) width instead
   of shrinking to fit the viewport, so columns stay readable and the wrap's
   overflow-x actually has something to scroll instead of squishing cells. */
@media (max-width: 768px){
  .admin-table-wrap .table{
    width: max-content;
    min-width: 100%;
  }

  /* Admin tables without a wrap scroll by themselves: the site container
     hides the horizontal overflow on mobile, which cut off their last
     columns (usually the actions). */
  .is-admin main table:not(.admin-table-wrap table){
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

.table{
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.table th,
.table td{
  /* padding: 10px 12px; */
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.table th{
  background: var(--overlay-02);
  font-weight: 700;
  font-size: 13px;
  border-bottom-color: var(--border);
}

.table tr:last-child td{ border-bottom: 0; }

.table tr:hover td{ background: var(--surface-hover); }

.table code{ font-size: 13px; }

/* Actions column helper */
.th-actions,
.td-actions{
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.text-left{ text-align: left; }
.text-center{ text-align: center; }
.text-right{ text-align: right; }

tr.is-me{ background: var(--overlay-03); }

/* ------------------------------------------------------------
   Pagination
------------------------------------------------------------ */

.pagination{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.pagination a{ text-decoration: none; }
.pagination a:hover{ text-decoration: underline; }

/* =============================================================================
  BADGES
============================================================================= */

.badge-tip {
  overflow: visible; /* safety */
}

.badge-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(360px, calc(100vw - 24px));

  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--overlay-86);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 30px var(--overlay-12);

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 9999;
  white-space: normal;
}

.badge-tip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: translateX(-50%) rotate(45deg);

  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  z-index: 10000;
}

.badge-tip:hover::after,
.badge-tip:hover::before,
.badge-tip:focus::after,
.badge-tip:focus::before,
.badge-tip:focus-visible::after,
.badge-tip:focus-visible::before {
  opacity: 1;
}

.badge-tip:hover::after,
.badge-tip:focus::after,
.badge-tip:focus-visible::after {
  transform: translateX(-50%) translateY(-2px);
}

/* =============================================================================
  HONEYPOT FIELD (for bots)
============================================================================= */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =============================================================================
  CONTENT / VIEW SWITCHER
============================================================================= */
.view-buttons{
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-buttons i{
  font-size: 1.5em;
  cursor: pointer;
}

.content{
  margin-top: 20px;
}

/* Your view modes can stay driven by JS/classes. */
.content.column-view > ul,
.content.list-view > ul{
  width: 100%;
  margin-bottom: 20px;
}

.content.grid-view > ul{
  width: calc(66.66% - 20px);
  margin-right: 20px;
  margin-bottom: 20px;
}

/* =============================================================================
  MISC
============================================================================= */
figure{
  position: relative;
  float: left;
  margin: 1.5em;
}

.cke_textarea_inline{
  border: 1px dashed grey;
}

.img-thumbnail{
  width: 100px;
  height: 100px;
}

.stick{
  width: 219px;
  height: 210px;
  padding: 10px;
  text-align: center;
  box-sizing: content-box;
  background: transparent url(img/note_stick_bg.png) top left no-repeat;
}

a.forgot-link{
  float: right;
}

/* =============================================================================
  SORT TAGS
============================================================================= */
.sort{
  float: right;
  text-align: right;
}

.sort-tag{
  display: inline-block;
  margin: 0;
}

.sort-tag input{
  display: none;
}

.sort-tag label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  line-height: 22px;
  font-size: 14px;
  padding: 0 8px;
  background-color: var(--tag-neutral-bg);
  color: var(--surface);
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
}

.sort-tag.on label{
  background-color: var(--tag-active-bg);
}

.sort-tag i{
  margin-top: 1px;
}

/* =============================================================================
  IMAGE FIELD PREVIEW
============================================================================= */
.preview input[type="file"]{
  display: none;
}

.preview img{
  cursor: pointer;
}

/* =============================================================================
  HEADER
============================================================================= */

.container > header{
  position: relative;
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-strong);
}

header .logo{
  width: 20%;
  display: flex;
  gap: 12px;
}

header .logo a.logo{
  display: inline-flex;
  align-items: center;
}

header .logo img{
  max-width: 100px;
}

header .top h1{
  margin: 0;
  padding: 0;
  text-align: center;
  font-size: 18px;
  text-transform: uppercase;
}

header .top{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Title & nav */
header .top .menu li a {
  transition: color .3s ease;
}

header .top .site-title {
  text-align: center;
  font: 400 clamp(20px, 4vw, 36px) "Fjalla One", sans-serif;
}

header .top .site-subtitle {
  font: 400 clamp(14px, 2vw, 24px) Verdana, sans-serif;
}

/* Right block */
header .user{
  width: 20%;
  display: flex;
  align-items: center;
  flex-direction: column-reverse;
  gap: 12px;
}

/* Profile (avatar + dropdown) */
header .profile{
  position: absolute;
  top: 0;
  right: 0;
}

header .profile .user-img{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  display: block;
  object-fit: cover;
  transition: box-shadow .15s ease, transform .08s ease;
}

header .profile .user-img:hover{
  box-shadow: 0 0 0 3px var(--ring-soft);
}

header .profile .user-img:active{
  transform: translateY(1px);
}

/* Dropdown */
header .profile-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 999;
  display: none;

  min-width: 200px;
  margin: 0;
  padding: 0;
  list-style: none;

  background: var(--surface);
  border: 1px solid var(--overlay-12);
  border-radius: 10px;
  box-shadow: 0 10px 30px var(--overlay-16);
}

header .profile-menu.open{
  display: block;
}

/* Allow keyboard open if something inside is focusable (nice bonus) */
header .profile:focus-within .profile-menu{
  display: block;
}

header .profile-menu::before{
	content: "";
	position: absolute;
	top: -7px;
	right: 10px;
	display: inline-block;
	border-right: 7px solid transparent;
	border-bottom: 7px solid var(--slate-soft);
	border-left: 7px solid transparent;
}

header .profile-menu h5{
  margin: 0;
  padding: 10px 12px;
  background-color: var(--surface-muted);
  text-align: center;
  font-size: 1.2em;
  white-space: nowrap;
  border-bottom: 1px solid var(--overlay-06);
}

header .profile-menu > li{
  list-style: none;
}

header .profile-menu > li > a{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

header .profile-menu > li > a i{
  width: 18px;
  text-align: center;
  color: var(--muted);
}

header .profile-menu > li > a:hover{
  background: var(--overlay-06);
  color: var(--text);
  text-decoration: none;
}

header .profile-menu > li > a:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
  border-radius: 8px;
  margin: 0 6px;
}

.logout-form { display: inline; }
.logout-form .btn-logout {
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--err-strong);
  font: inherit;
  cursor: pointer;
  font-size: 0.9em;
  display: flex;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
/* Special links */
.logout-form:hover{
  background: var(--overlay-06);
  color: var(--text);
}

header .profile-menu a.btn-admin {
  color: var(--text);
}

/* Icons */
header .icons{
	position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

header .icons a.btn-profile,
header .icons a.btn-admin,
header .icons a.btn-messages{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--charcoal);
  text-decoration: none;
}

header .icons a.btn-profile:hover,
header .icons a.btn-admin:hover,
header .icons a.btn-messages:hover{
  background: var(--overlay-06);
  color: var(--text);
  text-decoration: none;
}

header .icons a:active{
  transform: translateY(1px);
}

/* Cart badge */
header .item-count{
  /* show by default; hide with :empty */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0px;
  right: 0px;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;
  background: var(--accent-orange);
  color: var(--surface);
  font-size: 11px;
  line-height: 18px;
}

header .item-count:empty{
  display: none;
}

/* =============================================================================
  MAIN CONTENT
============================================================================= */

main{
  position: relative;
  margin: 10px auto;
}

main .page-title {
	text-align: center;
	padding-bottom: 20px;
}

main .page-title h1 {
	font: 400 1.5em "Fjalla One", Verdana, sans-serif;
	text-transform: none;
}

/* =============================================================================
  AUTH FORMS
  form.sign-in covers login/forgot/reset/register (they all share that
  class); form.profile and form.contact are their own templates.
============================================================================= */
.login-form{
  max-width: 30em;
  margin: 0 auto;
}

/* Core form widths */
form.contact,
form.profile{
  position: relative;
  max-width: 40rem;
  /* margin: 0 auto; */
}

/* Inputs */
form.contact textarea,
form.contact input,
form.sign-in input:not([type="checkbox"]),
form.profile input:not([type="radio"]){
  border-radius: 8px;
  width: 100%;
  height: 40px;
  padding: 10px;
  font-size: 1em;
  outline: none;
  border: 1px solid var(--gray-mid);
  transition: border-color .15s ease, box-shadow .15s ease;
}

form.contact textarea{
  height: auto;
  min-height: 180px;
  resize: vertical;
  line-height: 1.3;
}

form.contact input:focus,
form.contact textarea:focus,
form.sign-in input:focus,
form.profile input:focus{
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px var(--ring);
}

form.sign-in input[type="checkbox"]{
  width: auto;
  height: auto;
}

/* Submit buttons */
form.sign-in button.submit,
form.profile button.submit,
form.contact button.submit{
  color: var(--surface);
  border: none;
  border-radius: 8px;
  width: 100%;
  height: 40px;
  margin: 5px 0 0;
  font-size: 1em;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

/* Save buttons: --btn-save of the site palette (the accent green by default). */
form.profile button.submit,
form.contact button.submit{
  background-color: var(--btn-save, var(--accent-green));
}

form.profile button.submit:hover,
form.contact button.submit:hover{
  background-color: var(--btn-save-hover, var(--accent-green-dark));
}

form.sign-in button.submit{
  background-color: var(--accent-pink);
}

/* Field blocks */
form.sign-in .input-block,
form.contact .input-block{
  position: relative;
  margin: 20px 0;
}

/* Contact counter */
#message-contact-char{
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: .8em;
  color: var(--gray-dark);
}

/* Password helper */
i.toggle-password{
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--icon-gray);
  cursor: pointer;
}

i.toggle-info{
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--icon-gray);
  cursor: pointer;
}

.password-info{
  position: absolute;
  bottom: -160px;
  right: 0;
  width: auto;
  padding: 15px;
  background: var(--surface);
  font-size: .83em;
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--overlay-18);
  border: 1px solid var(--gray-light);
  display: none;
  z-index: 1;
}

.password-info ul{
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.password-info::before{
  content: "\25B2";
  position: absolute;
  top: -12px;
  left: 45%;
  font-size: 14px;
  line-height: 14px;
  color: var(--gray-light);
}

.invalid{
  background: url(img/pass-invalid.png) no-repeat 0 50%;
  padding-left: 22px;
  line-height: 24px;
  color: var(--accent-red);
}

.valid{
  background: url(img/pass-valid.png) no-repeat 0 50%;
  padding-left: 22px;
  line-height: 24px;
  color: var(--accent-green-dark);
}

.captcha{
  position: relative;
}
.captcha-reload{
  display: contents;
  cursor: pointer;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.button-submit {
    margin: 15px 0;
    /* clear: both; */
    /* position: relative; */
}

/* =============================================================================
  CART
============================================================================= */
#cart .table{
  border: 1px solid var(--gray-lighter);
  width: 80%;
  margin: auto;
  font-size: 14px;
}

#cart .table th,
#cart .table td{
  padding: 10px;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-lighter);
}

#cart .table tr.head{
  text-transform: uppercase;
}

#cart .table tr.total{
  font-weight: bold;
}

#cart .btn-remove{
  background: none;
  border: none;
  color: var(--icon-gray);
  cursor: pointer;
  padding: 0;
}

#cart .btn-remove:hover{ color: var(--charcoal); }

#cart .btn-empty{
  color: var(--icon-gray);
  cursor: pointer;
}

#cart .btn-empty:hover{ color: var(--charcoal); }

#cart .empty{
  text-align: center;
}

#cart .empty h3{
  margin-top: 10px;
  font-size: 2em;
  text-transform: uppercase;
  color: var(--gray-lighter);
}

#paypal-button-container{
  width: 50%;
  margin: 10px auto;
}

/* =============================================================================
  SHOP (audio)
============================================================================= */
#shop ul{ padding-left: 0; }

#shop li.category{
  position: relative;
  text-align: center;
  list-style: none;
}

#shop li.category a{
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

#shop li.category h3{
  line-height: 1.2;
  font: normal 1rem 'Fjalla One', sans-serif;
}

#shop li.category img{
  border-radius: 5px;
  box-shadow: 5px 5px 20px 0px var(--shadow-gray);
}

#shop li.audio{
  width: 159px;
  padding: 4px;
  text-align: center;
  list-style: none;
}

#shop li.audio .price{ font-weight: 700; }

#shop li.audio i{
  color: var(--icon-gray);
  cursor: pointer;
}

#shop li.audio i:hover{ color: var(--black); }

#shop #category{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding-left: 0;
}

#cat_parent{
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* =============================================================================
  ABOUT
============================================================================= */
#about{
  line-height: 1.5;
}

/* ------------------------------------------------------------
   Inline help / tips
   ------------------------------------------------------------ */

.input-block {
  position: relative;
}

.input-block .toggle-info {
  margin-left: 6px;
  color: var(--muted);
  cursor: pointer;
}

.input-block .toggle-info:hover,
.input-block .toggle-info:focus {
  color: var(--text);
}

.input-block .help {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;

  max-width: 320px;
  padding: 8px 10px;

  font-size: 13px;
  line-height: 1.4;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px var(--overlay-08);

  display: none;
}

.input-block .help.is-visible {
  display: block;
}

/* =============================================================================
  CONTACT PAGE
  Moved to contact.css (loaded only on the contact page via head_extra).
============================================================================= */

/* ==========================================================================
   Text editor - align classes
   ========================================================================== */

.ta-left { text-align: left; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.ta-justify { text-align: justify; }

/* =============================================================================
  FOOTER + COOKIE CONSENT + BACK TO TOP
  Bootstrap considered as reset/helpers only.
============================================================================= */

/* =============================================================================
  FOOTER
============================================================================= */
footer{
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  padding: 20px 12px 12px 12px;
  text-align: center;
  line-height: 1.5;
  color: var(--charcoal);
}

footer > p{
  font-size: .75em;
  margin-bottom: 0;
}

footer > p.stats{
  margin-bottom: 1rem;
}

footer > p.copyright{
  margin-bottom: 0rem;
}

footer > p.language-flag{
  margin-bottom: 0rem;
}

footer > p img{
  vertical-align: bottom;
}

footer > .powered-by {
  position: relative;
  margin: 20px;
}

footer .flag{
  position: relative;
  margin: 0 auto;
  display: block;
  width: 30px;
  height: 20px;
}

footer .flag.fr{
  background: transparent url(img/flag-fr.png) no-repeat center;
}

footer .flag.en{
  background: transparent url(img/flag-en.png) no-repeat center;
}

footer .legal a{
  text-decoration: underline;
}

footer .language-switch--flags{
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: .75rem 0;
}

footer .language-switch__flag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--white);
  opacity: .72;
}

footer .language-switch__flag:hover,
footer .language-switch__flag.is-active{
  opacity: 1;
  border-color: var(--overlay-18);
}

footer .language-switch__flag img{
  width: 24px;
  height: 16px;
  display: block;
}

/* =============================================================================
  COOKIE CONSENT
============================================================================= */
.cookie-consent {
  position: fixed;
  max-width: 600px;
  right: 10px;
  bottom: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--overlay-10);
  z-index: 9999;
}

.cookie-consent__inner{
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent__text p{
  margin: 6px 0 0;
  font-size: 14px;
}

.cookie-consent__actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-consent__panel{
  max-width: 980px;
  margin: 10px auto 0;
  padding: 12px;
  border: 1px solid var(--overlay-10);
  border-radius: 10px;
  background: var(--surface);
}

.cookie-consent__row{
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--overlay-06);
}

.cookie-consent__row:last-child{
  border-bottom: 0;
}

.cookie-consent__panel-actions{
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

/* =============================================================================
  TERMS / LEGAL / COOKIE
============================================================================= */
#terms_sales,
#terms_use,
#legal_notice,
#privacy_policy,
#cookies{
  text-align: justify;
  line-height: 1.2;
  font-size: 1em;
}

/* Cookie consent */
#cookie-consent{
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 0 8px 30px;
  text-align: left;
  font: normal 14px 'Trebuchet MS', Helvetica, sans-serif;
  line-height: 26px;
  color: var(--gray-lighter);
  background-color: var(--overlay-dark);
  z-index: 9999;
}

#cookie-consent {
  display: flex;
  align-items: center;
  gap: 12px;
}

#close-cookie-consent {
  margin-left: auto;
  width: 20px;
  height: 20px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
  text-align: center;
  border-radius: 3px;
}

#close-cookie-consent:hover {
  color: var(--surface);
}

#cookie-consent a.cookie-consent-ok {
  margin-left: 10px;
  padding: 6px 20px;
  color: var(--black);
  background-color: var(--accent-yellow);
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

#cookie-consent a.cookie-consent-ok:hover {
  background-color: var(--accent-yellow-hover);
}

/* =============================================================================
  BACK TO TOP
============================================================================= */
#back-top{
  display: none;
  text-align: center;
  position: fixed;
  cursor: pointer;
  right: 10px;
  bottom: 10px;
  transition: background-color .3s;
  z-index: 1000;
}

#back-top a{
  display: inline-block;
  width: 45px;
  height: 45px;
  background: var(--overlay-80);
  color: var(--surface);
  font-size: 1.25rem;
  line-height: 45px;
  text-decoration: none;
}

#back-top a:hover{
  background-color: var(--overlay-50);
}

/* =============================================================================
  LOADING OVERLAY (window.NatoraLoader, see core.js)
  Generic full-viewport "please wait" overlay any module's JS can trigger
  around an async operation, e.g. NatoraLoader.show() / .hide(). Lessons
  learned building this for AdminMedias:
  - position: fixed (viewport), not absolute (a container): centering in a
    tall, scrollable container can place the spinner far below the fold.
  - No CSS transition: if heavy synchronous work starts right after
    show() (e.g. rebuilding hundreds of rows), the fade can get frozen
    mid-way at near-zero opacity instead of ever fully appearing.
  - Visibility via a class (opacity), not the hidden attribute + display:
    Bootstrap's [hidden] { display: none !important; } (boots.min.css)
    would otherwise fight any display value set here.
============================================================================= */
.natora-loader {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .7);
  opacity: 0;
  pointer-events: none;
}

.natora-loader.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.natora-loader__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--overlay-12);
  border-top-color: var(--link);
  border-radius: 50%;
  animation: natora-loader-spin .8s linear infinite;
}

@keyframes natora-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =============================================================================
  REDUCED MOTION
============================================================================= */
@media (prefers-reduced-motion: reduce){
  *{
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------
   Switch (toggle): common/inc.switch.tpl, on admin and public pages
------------------------------------------------------------ */

.btn-switch{
  position: relative;
  display: inline-block;
  /* Avoid baseline alignment: an inline-block sitting on its parent's
     line box otherwise picks up the inherited line-height as extra
     space above/below it, visibly offsetting it from sibling controls
     (e.g. icon buttons in an adjacent table cell) that use inline-flex. */
  vertical-align: middle;
}

.btn-switch input{
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.btn-switch .toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 32px;
  cursor: pointer;
}

.btn-switch .toggle:has(input:disabled){
  cursor: not-allowed;
}

.toggle-ui{
  position: relative;
  width: 46px;
  height: 28px;
  border: 1px solid var(--overlay-15);
  border-radius: 999px;
  background: var(--overlay-06);
  transition:
    background-color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

.toggle-ui::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--overlay-10);
  border-radius: 999px;
  background: var(--surface);
  transform: translateY(-50%);
  transition: left .15s ease;
}

.btn-switch input:checked + .toggle-ui{
  background: var(--toast-success-bg);
  border-color: var(--ok-border);
}

.btn-switch input:checked + .toggle-ui::after{
  left: 21px;
}

.btn-switch input:disabled + .toggle-ui{
  background: var(--surface-disabled);
  border-color: var(--gray);
}

.btn-switch input:focus-visible + .toggle-ui{
  box-shadow: 0 0 0 4px var(--focus-soft);
}

.btn-switch__label{
  position: absolute;
  top: -20px;
  left: 5px;
  /* The switch is only 46px wide: a label of several words stays on one
     line instead of wrapping (e.g. "For sale"). */
  white-space: nowrap;
  font-size: .8rem;
  color: var(--icon-gray);
  background: none;
  transform-origin: 0 0;
  transition: all .2s;
  pointer-events: none;
}

/* Table column reserved for a .btn-switch (mirrors .col-drag below, next
   to the sortable-drag column width). Combine with .text-center. */
.col-switch{
  width: 90px;
}

/* The switch is usually wrapped in its own <form> for auto-submit-on-toggle.
   A bare <form> is block-level with an inline-block child (.btn-switch),
   which sits on a line box sized by the inherited line-height -- taller
   than the switch itself, so it visually drifts down/up depending on font
   metrics. Force the form into a flex box so it always centers tightly
   around the switch, matching sibling .admin-actions icon-button cells. */
.col-switch form{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
