/* Simple.css base styles - without color definitions */
/* Colors are managed by application.css theme system */

:root {
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;
  --border-width: 1px;
}

*,
:before,
:after {
  box-sizing: border-box;
}

textarea,
select,
input,
progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

html {
  font-family: var(--sans-font);
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background-color: var(--bg);
  grid-template-columns: 1fr min(45rem, 90%) 1fr;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  display: grid;
}

body > * {
  grid-column: 2;
}

/* Allow main content area to span full width but keep normal flow */
body > main.main-content {
  grid-column: 2;
}

body > header {
  background-color: var(--accent-bg);
  border-bottom: var(--border-width) solid var(--border);
  text-align: center;
  grid-column: 1 / -1;
  padding: 0 0.5rem 2rem;
}

body > header > :only-child {
  margin-block-start: 2rem;
}

body > header h1 {
  max-width: 1200px;
  margin: 1rem auto;
}

body > header p {
  max-width: 40rem;
  margin: 1rem auto;
}

main {
  padding-top: 1.5rem;
}

body > footer {
  color: var(--text-light);
  text-align: center;
  border-top: var(--border-width) solid var(--border);
  margin-top: 4rem;
  padding: 2rem 1rem 1.5rem;
  font-size: 0.9rem;
}

h1 {
  font-size: 3rem;
}

h2 {
  margin-top: 3rem;
  font-size: 2.6rem;
}

h3 {
  margin-top: 3rem;
  font-size: 2rem;
}

h4 {
  font-size: 1.44rem;
}

h5 {
  font-size: 1.15rem;
}

h6 {
  font-size: 0.96rem;
}

p {
  margin: 1.5rem 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

@media only screen and (width <= 720px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2.1rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1.25rem;
  }
}

a,
a:visited {
  color: var(--accent);
}

a:hover {
  text-decoration: none;
}

button,
.button,
a.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  border: var(--border-width) solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-text);
  padding: 0.5em;
  line-height: normal;
  text-decoration: none;
}

.button[aria-disabled="true"],
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
  cursor: not-allowed;
  background-color: var(--disabled);
  border-color: var(--disabled);
  color: var(--text-light);
}

input[type="range"] {
  padding: 0;
}

abbr[title] {
  cursor: help;
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

button:enabled:hover,
.button:not([aria-disabled="true"]):hover,
input[type="submit"]:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  cursor: pointer;
}

.button:focus-visible,
button:focus-visible:where(:enabled),
input:enabled:focus-visible:where(
    [type="submit"],
    [type="reset"],
    [type="button"]
  ) {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

header nav {
  padding: 1rem 0 0;
  font-size: 1rem;
  line-height: 2;
}

header nav ul,
header nav ol {
  flex-flow: wrap;
  place-content: space-around center;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
}

header nav ul li,
header nav ol li {
  display: inline-block;
}

header nav a,
header nav a:visited {
  border: var(--border-width) solid var(--border);
  border-radius: var(--standard-border-radius);
  color: var(--text);
  margin: 0 0.5rem 1rem;
  padding: 0.1rem 1rem;
  text-decoration: none;
  display: inline-block;
}

header nav a:hover,
header nav a.current,
header nav a[aria-current="page"],
header nav a[aria-current="true"] {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  cursor: pointer;
}

@media only screen and (width <= 720px) {
  header nav a {
    border: none;
    padding: 0;
    line-height: 1;
    text-decoration: underline;
  }
  header nav a.current {
    background: 0 0;
  }
}

aside,
details,
pre,
progress {
  background-color: var(--accent-bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
}

aside {
  float: right;
  width: 30%;
  margin-inline-start: 15px;
  padding: 0 15px;
  font-size: 1rem;
}

[dir="rtl"] aside {
  float: left;
}

@media only screen and (width <= 720px) {
  aside {
    float: none;
    width: 100%;
    margin-inline-start: 0;
  }
}

article,
fieldset,
dialog {
  border: var(--border-width) solid var(--border);
  border-radius: var(--standard-border-radius);
  margin-bottom: 1rem;
  padding: 1rem;
}

article h2:first-child,
section h2:first-child,
article h3:first-child,
section h3:first-child {
  margin-top: 1rem;
}

section {
  border-top: var(--border-width) solid var(--border);
  border-bottom: var(--border-width) solid var(--border);
  margin: 3rem 0;
  padding: 2rem 1rem;
}

section + section,
section:first-child {
  border-top: 0;
  padding-top: 0;
}

section + section {
  margin-top: 0;
}

section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

details {
  padding: 0.7rem 1rem;
}

summary {
  cursor: pointer;
  word-break: break-all;
  margin: -0.7rem -1rem;
  padding: 0.7rem 1rem;
  font-weight: 700;
}

details[open] > summary + * {
  margin-top: 0;
}

details[open] > summary {
  margin-bottom: 0.5rem;
}

details[open] > :last-child {
  margin-bottom: 0;
}

table {
  border-collapse: collapse;
  margin: 1.5rem 0;
}

figure > table {
  width: max-content;
  margin: 0;
}

td,
th {
  border: var(--border-width) solid var(--border);
  text-align: start;
  padding: 0.5rem;
}

th {
  background-color: var(--accent-bg);
  font-weight: 700;
}

tr:nth-child(2n) {
  background-color: var(--accent-bg);
}

table caption {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

textarea,
select,
input,
button,
.button {
  font-size: inherit;
  border-radius: var(--standard-border-radius);
  box-shadow: none;
  max-width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5em;
  font-family: inherit;
  display: inline-block;
}

textarea,
select,
input {
  color: var(--text);
  background-color: var(--bg);
  border: var(--border-width) solid var(--border);
}

label {
  display: block;
}

textarea:not([cols]) {
  width: 100%;
}

select:not([multiple]) {
  background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%),
    linear-gradient(135deg, var(--text) 51%, transparent 49%);
  background-position: calc(100% - 15px), calc(100% - 10px);
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-inline-end: 25px;
}

[dir="rtl"] select:not([multiple]) {
  background-position: 10px, 15px;
}

input[type="checkbox"],
input[type="radio"] {
  vertical-align: middle;
  width: min-content;
  position: relative;
}

input[type="checkbox"] + label,
input[type="radio"] + label {
  display: inline-block;
}

input[type="radio"] {
  border-radius: 100%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--accent);
}

input[type="checkbox"]:checked:after {
  content: " ";
  border-right: solid var(--bg) 0.08em;
  border-bottom: solid var(--bg) 0.08em;
  background-color: #0000;
  border-radius: 0;
  width: 0.2em;
  height: 0.4em;
  font-size: 1.8em;
  position: absolute;
  top: 0.04em;
  left: 0.18em;
  transform: rotate(45deg);
}

input[type="radio"]:checked:after {
  content: " ";
  background-color: var(--bg);
  border-radius: 100%;
  width: 0.3em;
  height: 0.3em;
  font-size: 1.8em;
  position: absolute;
  top: 0.125em;
  left: 0.125em;
}

@media only screen and (width <= 720px) {
  textarea,
  select,
  input {
    width: 100%;
  }
}

input[type="color"] {
  height: 2.5rem;
  padding: 0.2rem;
}

input[type="file"] {
  border: 0;
}

hr {
  height: var(--border-width);
  background: var(--border);
  border: none;
  margin: 1rem auto;
}

mark {
  border-radius: var(--standard-border-radius);
  background-color: var(--marked);
  color: #000;
  padding: 2px 5px;
}

mark a {
  color: #0d47a1;
}

img,
video {
  border-radius: var(--standard-border-radius);
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
  display: block;
  overflow-x: auto;
}

figure > img,
figure > picture > img {
  margin-inline: auto;
  display: block;
}

figcaption {
  text-align: center;
  color: var(--text-light);
  margin-block: 1rem;
  font-size: 0.9rem;
  position: sticky;
  left: 0;
}

blockquote {
  border-inline-start: 0.35rem solid var(--accent);
  color: var(--text-light);
  margin-block: 2rem;
  margin-inline: 2rem 0;
  padding: 0.4rem 0.8rem;
  font-style: italic;
}

cite {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: normal;
}

dt {
  color: var(--text-light);
}

code,
pre,
pre span,
kbd,
samp {
  font-family: var(--mono-font);
  color: var(--code);
}

kbd {
  color: var(--preformatted);
  border: var(--border-width) solid var(--preformatted);
  border-bottom: 3px solid var(--preformatted);
  border-radius: var(--standard-border-radius);
  padding: 0.1rem 0.4rem;
}

pre {
  max-width: 100%;
  color: var(--preformatted);
  padding: 1rem 1.4rem;
  overflow: auto;
}

pre code {
  color: var(--preformatted);
  background: 0 0;
  margin: 0;
  padding: 0;
}

progress {
  width: 100%;
}

progress:indeterminate {
  background-color: var(--accent-bg);
}

progress::-webkit-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent-bg);
}

progress::-webkit-progress-value {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
}

progress::-moz-progress-bar {
  border-radius: var(--standard-border-radius);
  background-color: var(--accent);
  transition-property: width;
  transition-duration: 0.3s;
}

progress:indeterminate::-moz-progress-bar {
  background-color: var(--accent-bg);
}

dialog {
  background-color: var(--bg);
  max-width: 40rem;
  margin: auto;
}

dialog::backdrop {
  background-color: var(--bg);
  opacity: 0.8;
}

@media only screen and (width <= 720px) {
  dialog {
    max-width: calc(100vw - 2rem);
  }
}

sup,
sub {
  vertical-align: baseline;
  position: relative;
}

sup {
  top: -0.4em;
}

sub {
  top: 0.3em;
}

.notice {
  background: var(--accent-bg);
  border: var(--border-width) solid var(--border);
  border-radius: var(--standard-border-radius);
  margin: 2rem 0;
  padding: 1.5rem;
}

div.notice p:first-of-type {
  margin-top: 0;
}

div.notice p:last-of-type {
  margin-bottom: 0;
}

@media print {
  @page {
    margin: 1cm;
  }
  body {
    display: block;
  }
  body > header {
    background-color: unset;
  }
  body > header nav,
  body > footer {
    display: none;
  }
  article {
    border: none;
    padding: 0;
  }
  a[href^="http"]:after {
    content: " <" attr(href) ">";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  a {
    text-decoration: none;
  }
  p {
    widows: 3;
    orphans: 3;
  }
  hr {
    border-top: var(--border-width) solid var(--border);
  }
  mark {
    border: var(--border-width) solid var(--border);
  }
  pre,
  table,
  figure,
  img,
  svg {
    break-inside: avoid;
  }
  pre code {
    white-space: pre-wrap;
  }
}
.constraints-list li {
  border-left-color: var(--border);
}

/* Admin tools page styles (moved from inline template) */
.admin-tools-container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 2rem 1rem;
  grid-column: 1 / -1 !important; /* Break out of Simple.css body grid constraint */
}

.admin-tools-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.admin-tools-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tool-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--text);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.tool-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.tool-card:hover .tool-icon {
  opacity: 1;
}

/* Dark theme icon adjustment */
:root[data-theme="dark"] .admin-tools-container .tool-icon {
  filter: brightness(0) saturate(100%) invert(1) opacity(0.8);
}

:root[data-theme="dark"] .admin-tools-container .tool-card:hover .tool-icon {
  filter: brightness(0) saturate(100%) invert(1) opacity(1);
}

/* Exclude colored icons from inversion */
.tool-icon-color {
  filter: none !important;
  opacity: 1 !important;
}

.tool-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.tool-description {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .admin-tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  .tool-card {
    padding: 1rem;
    min-height: 140px;
  }
  .tool-icon {
    width: 48px;
    height: 48px;
  }
  .tool-name {
    font-size: 1rem;
  }
}

/* Render an external shadow from the badge container so it isn't clipped
   by the badge's clip-path. The shadow is slightly more opaque and blurred
   to appear under the badge (light coming from upper-left). */
.moodboard-header,
.moodboards-index td.status-cell {
  position: relative;
}

.moodboards-index td.status-cell::after {
  content: "";
  position: absolute;
  /* shift shadow to the right of center to simulate light from upper-left */
  left: 60%;
  transform: translateX(-10%) rotate(6deg);
  /* place noticeably below the badge so the bottom reads as lifted */
  top: 1.8rem;
  width: 66%;
  max-width: 220px;
  height: 18px;
  /* more opaque shadow for a stronger lift illusion */
  background: rgba(0, 0, 0, 0.45);
  filter: blur(8px);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

/* Shared Danger Zone styling for admin edit pages */
.admin-danger-zone {
  background-color: var(--danger-bg, #fff3cd);
  border: 2px solid var(--danger-border, #ffc107);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 600px;
  margin-top: 2rem;
}
.admin-danger-zone h2 {
  color: var(--danger-title, #856404);
  margin-top: 0;
}
.admin-danger-zone .dz-message {
  color: var(--danger-title, #856404);
  margin-bottom: 1rem;
}
.admin-danger-zone .dz-delete-btn {
  background-color: #dc3545;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.admin-danger-zone .dz-delete-btn:hover {
  opacity: 0.95;
}

/* Admin galleries index styles */
.admin-galleries-table tbody tr.expired {
  background-color: var(--danger-bg, #ffe6e6);
}
.admin-galleries-table tbody tr.expired td {
  color: var(--danger-title, #6b0b0b);
}

.admin-galleries-pagination {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  /* prevent the container from forcing line breaks */
  white-space: nowrap;
  overflow-x: auto;
}
.admin-galleries-pagination .pagination-inner {
  flex: 0 1 auto;
  display: inline-block;
  white-space: nowrap;
}

/* Ensure paginate helper output renders on a single line */
.admin-galleries-pagination .pagination {
  display: inline-block;
  margin: 0;
  padding: 0;
}
.admin-galleries-pagination .pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-galleries-pagination .pagination li {
  display: inline-block;
}
.admin-galleries-pagination .pagination a,
.admin-galleries-pagination .pagination span {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.25rem;
}

.admin-stats {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg, #fff);
  color: var(--text, #222);
}
.admin-stats .stats-list {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
/* Moodboard edit page styles */
.moodboard-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.moodboard-image-card {
  position: relative;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.2s;
}

.moodboard-image-card.is-cover {
  border: 3px solid #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.3);
}

.moodboard-image-card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.moodboard-cover-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: #28a745;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 5;
}

.moodboard-image-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.moodboard-image-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.moodboard-image-card:hover .moodboard-image-remove-btn {
  opacity: 1;
}

.moodboard-image-card-actions {
  padding: 0.5rem;
  background: var(--accent-bg, #f8f9fa);
}

/* Dynamic lists for links and constraints */
.dynamic-list {
  margin: 1rem 0;
}

.dynamic-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.dynamic-item input[type="text"],
.dynamic-item input[type="url"] {
  flex: 1;
}

.dynamic-item input[type="checkbox"] {
  width: auto;
}

.btn-remove {
  flex-shrink: 0;
}

/* Dropzone styles */
.dropzone {
  border: 2px dashed var(--border, #ced4da);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  background: var(--accent-bg, #fafafa);
}

.dropzone.dragover {
  border-color: var(--accent, #80bdff);
  background: #eef9ff;
}

.dropzone .previews {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  justify-content: center;
}

.dropzone .previews img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--border, #ddd);
  border-radius: 4px;
}

/* Autosave status indicator */
.autosave-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #fff;
}

.autosave-status.saving {
  background: #17a2b8;
}

.autosave-status.saved {
  background: #28a745;
}

.autosave-status.uploading {
  background: #007bff;
}

.autosave-status.error {
  background: #dc3545;
}
/* Collection dropdown styling */
.collection-dropdown {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  min-width: 200px;
}

.collection-dropdown:focus {
  outline: 2px solid rgba(0, 123, 255, 0.25);
  border-color: #007bff;
}

/* List pages general styles */
.collection-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.collection-header {
  margin-bottom: 2rem;
  text-align: center;
}

.collection-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.collection-description {
  color: #666;
  margin: 0.5rem 0 1rem 0;
  line-height: 1.6;
}

.collection-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.back-link {
  margin-bottom: 1.5rem;
}

.back-link a {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
}

.back-link a:hover {
  text-decoration: underline;
}

/* List show page - selected items with notes */
.collection-items {
  margin-top: 2rem;
}

.collection-item {
  margin-bottom: 2rem;
}

.collection-item .thumb {
  display: block;
  margin-bottom: 0.5rem;
}

.item-note {
  background: #f9f9f9;
  padding: 0.75rem;
  border-left: 4px solid #4caf50;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}

.empty-collection {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin: 3rem 0;
}

/* Reuse gallery-thumbs grid for collection show */
.collection-items .gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.collection-items .thumb {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.collection-items .thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Forms */
.field {
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  max-width: 600px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-size: 0.95rem;
  text-align: center;
}

.btn-primary {
  background: #4caf50;
  color: white;
  border-color: #4caf50;
}

.btn-primary:hover {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: #666;
  color: white;
  border-color: #666;
}

.btn-secondary:hover {
  background: #555;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #ccc;
  color: #666;
}

/* Errors */
.errors {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.errors h3 {
  color: #c00;
  margin-top: 0;
  font-size: 1rem;
}

.errors ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
  color: #c00;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .collections-toolbar {
    flex-direction: column;
  }

  .collection-dropdown {
    width: 100%;
  }

  .collection-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .collection-items .gallery-thumbs {
    grid-template-columns: 1fr;
  }
}
/* Collection edit page - picture selection grid */
.collection-pictures-section {
  margin-top: 2rem;
}

.filter-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.collection-pictures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.picture-item {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  background: var(--accent-bg);
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

.picture-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  z-index: 10000;
}

.picture-checkbox {
  text-align: center;
  margin-bottom: 0.5rem;
}

.picture-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.picture-thumb {
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  border-radius: 4px;
  background: var(--bg);
  position: relative;
  cursor: pointer;
}

.picture-thumb label {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

.picture-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s;
}

/* Hover preview - show much larger version on top of everything */
.picture-thumb:hover {
  z-index: 10000;
}

.picture-thumb:hover label {
  animation: collection-thumb-preview-activate 0s linear 1s forwards;
}

@keyframes collection-thumb-preview-activate {
  to {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    max-width: 1000px;
    max-height: 800px;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10001;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 3px solid var(--accent);
    overflow: hidden;
  }
}

.picture-thumb:hover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}

.picture-note {
  margin-top: 0.5rem;
}

.picture-note textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  min-height: 60px;
}

.picture-note textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.picture-note textarea:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .collection-pictures-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .picture-thumb:hover label {
    /* Disable hover preview on mobile */
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
    border: none;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .picture-thumb:hover label {
    animation: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    max-width: 1000px;
    max-height: 800px;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10001;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 3px solid var(--accent);
    overflow: hidden;
  }
}
/* Linktree-style layout for links page */

.links-page {
  max-width: 680px !important;
  margin: 0 auto !important;
  padding: 2rem 1rem !important;
  text-align: center !important;
}

.links-header {
  margin-bottom: 2rem !important;
}

.links-title {
  font-size: 1.75rem !important;
  font-weight: 600 !important;
  margin-bottom: 1rem !important;
  color: var(--text) !important;
}

.links-admin-btn {
  display: inline-block !important;
  padding: 0.5rem 1.25rem !important;
  margin-top: 0.5rem !important;
  background: var(--accent) !important;
  color: var(--bg) !important;
  text-decoration: none !important;
  border-radius: 2rem !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  transition: opacity 0.2s, transform 0.1s !important;
}

.links-admin-btn:hover {
  opacity: 0.9 !important;
  transform: translateY(-1px) !important;
}

.links-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.link-card {
  display: block !important;
  padding: 1.25rem 1.5rem !important;
  background: var(--bg) !important;
  border: 2px solid var(--border) !important;
  border-radius: 1rem !important;
  text-decoration: none !important;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s !important;
  position: relative !important;
  text-align: left !important;
}

.link-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.link-card a {
  text-decoration: none !important;
  display: block !important;
}

.link-card-title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin-bottom: 0.25rem !important;
  display: block !important;
}

.link-card-description {
  font-size: 0.9rem !important;
  color: var(--text-light) !important;
  line-height: 1.4 !important;
  display: block !important;
  margin: 0 !important;
}

.link-card-actions {
  display: flex !important;
  gap: 0.5rem !important;
  justify-content: center !important;
  margin-top: 0.75rem !important;
  padding-top: 0.75rem !important;
  border-top: 1px solid var(--border) !important;
}

.link-edit-btn,
.link-delete-btn {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.85rem !important;
  border: 1px solid var(--border) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  text-decoration: none !important;
  border-radius: 0.5rem !important;
  cursor: pointer !important;
  transition: background 0.2s, border-color 0.2s !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
}

.link-edit-btn:hover {
  background: var(--accent-bg) !important;
  border-color: var(--accent) !important;
}

.link-delete-btn:hover {
  background: rgba(220, 53, 69, 0.1) !important;
  border-color: #dc3545 !important;
  color: #dc3545 !important;
}

.links-notice {
  padding: 0.75rem 1rem !important;
  margin-bottom: 1rem !important;
  background: rgba(76, 175, 80, 0.1) !important;
  border: 1px solid rgba(76, 175, 80, 0.3) !important;
  border-radius: 0.5rem !important;
  color: #4caf50 !important;
  font-size: 0.9rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .links-page {
    padding: 1.5rem 1rem !important;
  }

  .links-title {
    font-size: 1.5rem !important;
  }

  .link-card {
    padding: 1rem 1.25rem !important;
  }

  .link-card-title {
    font-size: 1rem !important;
  }

  .link-card-description {
    font-size: 0.85rem !important;
  }
}
/* Styles for IG Tools page */
.igtools-page {
  max-width: 980px;
  margin: 1.25rem auto;
  padding: 0 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  color: var(--text);
}
.igtools-forms {
  display: grid;
  grid-template-columns: 1fr; /* always stacked vertically */
  gap: 1rem;
}
.igtools-form {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  color: var(--text);
}
.igtools-form h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.igtools-form .field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.igtools-form label {
  width: 160px;
  font-weight: 600;
  color: var(--text);
}
.igtools-form input[type="file"] {
  flex: 1;
}
.igtools-form .actions {
  margin-top: 0.5rem;
}
.igtools-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.igtools-summary {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.igtools-summary .col {
  flex: 1;
  background: var(--accent-bg);
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text);
}
.igtools-results {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 1rem;
}
.igtools-results .list {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 6px;
  color: var(--text);
}
.igtools-results h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}
.igtools-results ul {
  margin: 0;
  padding-left: 1.2rem;
}
.igtools-results li {
  margin-bottom: 0.45rem;
}
.igtools-ts {
  color: var(--text-light);
  margin-left: 0.5rem;
  font-size: 0.85rem;
}
.igtools-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.igtools-note {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
/* Moodboards page styles moved from show.html.erb */
.moodboard-header {
  margin-bottom: 2rem;
}

/* Keep a subtle top highlight on the badge (top 10px across full width) */
.moodboard-status-bookmark:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 10px; /* only the top 10px */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 11;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.moodboard-status-bookmark {
  position: absolute;
  top: 0;
  right: 15px;
  z-index: 10;
  padding: 0.5rem 0.75rem 0.5rem 0.75rem;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8; /* 10% transparency */
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
}

.moodboard-status-bookmark-shadow {
  filter: drop-shadow(-1px 6px 3px rgba(50, 50, 0, 0.8));
}

.moodboard-status-done {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.moodboard-status-ready {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
}

.moodboard-status-in_progress {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.moodboard-status-idea {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.moodboard-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.moodboard-image {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.moodboard-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.moodboard-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.image-comment {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

.section {
  margin: 2rem 0;
}

.links-list,
.constraints-list {
  list-style: none;
  padding: 0;
}

.links-list li,
.constraints-list li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border-left: 3px solid #007bff;
  border-radius: 4px;
}

.links-list small {
  color: #495057;
}

.constraints-list li {
  border-left-color: #6c757d;
}

.constraints-list li.resolved {
  border-left-color: #28a745;
  opacity: 0.7;
}

.constraint-status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.constraint-open {
  background: #fff3cd;
  color: #856404;
}

.constraint-resolved {
  background: #d4edda;
  color: #155724;
}
/* Shared tab styles used across the app (galleries, moodboards, personnal pages) */
.tabs-container {
  border-bottom: 2px solid var(--border);
  margin: 2rem 0 0 0;
}
.tabs-nav {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tab-button {
  padding: 0.75rem 1.25rem;
  background: var(--accent-bg);
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  display: inline-block;
  position: relative;
  bottom: -2px;
}
.tab-button:hover {
  color: var(--text);
}
.tab-button.active {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  border-bottom: 2px solid var(--bg);
}

.tab-content {
  display: none;
  padding: 2rem 0;
}
.tab-content.active {
  display: block;
}
:root {
  --dl-bg: #ffffff;
  --dl-accent: #2563eb;
  --dl-accent-2: #06b6d4;
  --dl-muted: #6b7280;
  --dl-success: #10b981;
  --dl-danger: #ef4444;
  --dl-pill: #f3f4f6;
}

.dl-section {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: 8px;
  background: var(--dl-bg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.dl-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.dl-field {
  flex: 1 1 180px;
  min-width: 150px;
}
.dl-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.dl-slider {
  flex: 1 1 280px;
}
.dl-slider.small {
  flex: 1 1 140px;
}
.slider-label {
  font-weight: 600;
  margin: 0.25rem 0;
}
.scale-labels {
  font-size: 0.85rem;
  color: var(--dl-muted);
  margin-top: 0.25rem;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(90deg, var(--dl-accent), var(--dl-accent-2));
  border-radius: 999px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--dl-accent);
  margin-top: -7px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
input[type="range"]:focus {
  outline: none;
}

.toggle-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--dl-pill);
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.03);
  user-select: none;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}
/* keep the checkbox in the DOM but visually hide it for accessibility and consistent behavior */
.pill .hidden-checkbox {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  overflow: hidden !important;
}
.pill.active {
  background: var(--dl-accent);
  color: #fff;
  transform: translateY(-1px);
}
.pill .pill-label {
  font-weight: 600;
}

.dl-textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.dl-actions {
  text-align: right;
  margin-top: 1rem;
}
.dl-button {
  background: var(--dl-accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: none;
}

.dl-table {
  width: 100%;
  border-collapse: collapse;
}
.dl-table th,
.dl-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
}

@media (max-width: 720px) {
  .dl-grid {
    flex-direction: column;
  }
  .dl-slider.small {
    width: 100%;
  }
}
/* Compact single-line to-do item styles */
.personnal-todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}
.life-domain-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 12px;
}
.personnal-todo-main {
  flex: 1;
  min-width: 0;
}
.personnal-todo-title {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.personnal-todo-title:hover {
  text-decoration: underline;
}
.personnal-todo-meta {
  margin-left: auto;
  color: #6b7280;
  font-size: 0.9rem;
}
.life-domain-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
/* Styles for recursive children list in to_do_item edit form */
.personnal-todo-children {
  /* remove list marker but keep indentation */
  list-style: none !important;
  padding-left: 1rem;
  margin: 0.5rem 0;
}
.personnal-todo-children ul {
  list-style: none !important;
  padding-left: 1rem;
}
.personnal-todo-children li {
  /* hide marker for modern browsers */
  list-style: none !important;
}
.personnal-todo-children li::marker {
  content: none;
}
.personnal-todo-children .personnal-todo-child {
  padding: 0.25rem 0;
}
.personnal-todo-children .personnal-todo-child .personnal-child-link {
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.personnal-todo-children .personnal-todo-child ul {
  padding-left: 1rem;
  margin-top: 0.25rem;
}
.personnal-todo-child .badge {
  font-size: 0.7rem;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *











 */

svg {
  fill: var(--accent);
  /*	stroke: var(--accent-light); */
  /*  fill: red;
stroke: yellow; */
}

svg.tslogo {
  fill: var(--text);
  /* Add your styles here */
}

.sn_logo {
  display: inline;
  margin: 0 auto;
  height: 1em;
  width: 1em;
  vertical-align: middle;
}

a.sn_link {
  box-shadow: inset 0 0 0 0 var(--accent);
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
  display: inline-block;
  vertical-align: middle;
  text-decoration: none;
  transition: color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
/* make the button_to form inline and remove default button chrome */
form.inline-button-form {
  display: inline;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

form.inline-button-form .sn_button {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0.25rem;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  display: inline;
  vertical-align: middle;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* keep a visible focus ring for accessibility */
form.inline-button-form .sn_button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
}

button.sn_button {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0.25rem;
  color: inherit;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
  display: inline;
  vertical-align: middle;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* keep an accessible focus style */
button.sn_button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18);
}

a.sn_link:hover {
  box-shadow: inset 300px 0 0 0 var(--accent);
  color: var(--bg);
}

.center {
  margin-left: auto;
  margin-right: auto;
}

.menu-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
  align-items: center;
}

.account-count {
  width: 100%;
  align-items: center;
}

.menu-items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu-bar span.separator {
  color: var(--text-light);
}

.menu-bar .inline-form {
  margin: 0;
}

.menu-bar .inline-form__input {
  margin: 0;
  height: 1.5rem;
}

.menu-bar .inline-form__submit {
  height: 1.5rem;
  padding: 0 0.75rem;
}
h1,
h2,
h3,
h4,
p {
  text-align: center;
}

#bottom-nav-bar {
  font-size: 0.7em;
}

img.final-picture {
  border-radius: 0;
  margin-top: 30px;
  border-width: 10px;
  border-color: black;
  filter: drop-shadow(-10px 10px 10px #111);
}

img.sqimg {
  border-radius: 0;
}

img.responsive-img {
  width: 80%;
  height: auto;
  max-width: 100%;
}

/* Default theme variables (dark as fallback) */
:root {
  --bg: #212121;
  --accent-bg: #2b2b2b;
  --text: #dcdcdc;
  --text-light: #ababab;
  --border: #666;
  --accent: #ffb300;
  --accent-hover: #ffe099;
  --accent-text: #000;
  --accent-light: #ffecb3;
  --accent-dark: #785501;
  --code: #f06292;
  --preformatted: #ccc;
  --marked: #ffdd33;
  --disabled: #111;
  --gallery-pick-model-bg: rgba(255, 179, 0, 0.12);
  --gallery-pick-photographer-bg: rgba(255, 221, 51, 0.1);
}

/* Light theme override - must override Simple.css in all cases */
:root[data-theme="light"] {
  --bg: #fff !important;
  /* Theme toggle (darkmode) */
  input#darkmode-toggle {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  label[for="darkmode-toggle"] {
    display: inline-block;
    width: 50px;
    height: 24px;
    border-radius: 999px;
    background: var(--accent-bg);
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }

  label[for="darkmode-toggle"]::after {
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffcc89, #d8860b);
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    transition: left 0.2s ease, background 0.2s ease;
  }

  input#darkmode-toggle:checked + label[for="darkmode-toggle"] {
    background: #242424;
  }

  input#darkmode-toggle:checked + label[for="darkmode-toggle"]::after {
    left: calc(100% - 22px);
    background: linear-gradient(180deg, #777, #3a3a3a);
  }

  label[for="darkmode-toggle"] svg {
    position: absolute;
    width: 12px;
    top: 6px;
    z-index: 2;
    pointer-events: none;
  }

  label[for="darkmode-toggle"] svg.sun {
    left: 6px;
    fill: #fff;
  }
  label[for="darkmode-toggle"] svg.moon {
    right: 6px;
    fill: #7e7e7e;
  }

  input#darkmode-toggle:checked + label[for="darkmode-toggle"] svg.sun {
    fill: #7e7e7e;
  }
  input#darkmode-toggle:checked + label[for="darkmode-toggle"] svg.moon {
    fill: #fff;
  }
  

span.ig_account_name {
  font-style: italic;
  color: var(--accent);
  opacity: 0.4;
  font-size: 0.9em;
}

/* Style for the inline personnal button */
.inline-personnal-btn {
  display: inline;
  margin: 0 0.5em;
  padding: 0.2em 0.6em;
  font-size: 1em;
  background: #f3f3f3;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}
.inline-personnal-btn input[type="submit"] {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* like one-column layout for test_home */
.page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 900px;
  margin: 2rem auto;
}
.cell {
  background: #f8f8fc;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  font-size: 1.2rem;
  position: relative;
  padding-top: 2.5rem;
}
.cell.cell-1 {
  width: 100%;
  height: 100%;
  font-weight: bold;
  font-size: 1.5rem;
  background: #e0eaff;
}

.cell.cell-1 {
  background: #3b82f6;
}
.cell.cell-2 {
  background: #10b981;
}
.cell.cell-3 {
  background: #f59e42;
}
.cell.cell-4 {
  background: #ef4444;
}

.cell-title {
  position: absolute;
  top: 1.2rem;
  left: 1.5rem;
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  z-index: 2;
  background: transparent;
  margin: 0;
  padding: 0;
}

/* Improve visibility of Instagram SVG icons */
.font-icon-svg.e-fab-instagram {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  fill: #ffffff !important; /* solid white fill for contrast */
  /* subtle outline and shadow for visibility on varied backgrounds */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.font-icon-svg.e-fab-instagram path {
  fill: #ffffff !important;
  /* add a faint stroke as a fallback to make thin shapes heavier in some renderers */
  stroke: rgba(0, 0, 0, 0.2);
  stroke-width: 10;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Ensure theme toggle styles are available globally (duplicate to avoid nesting issues) */
input#darkmode-toggle {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

label[for="darkmode-toggle"] {
  display: inline-block;
  width: 50px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-bg);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

label[for="darkmode-toggle"]::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffcc89, #d8860b);
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: left 0.2s ease, background 0.2s ease;
}

input#darkmode-toggle:checked + label[for="darkmode-toggle"] {
  background: #242424;
}

input#darkmode-toggle:checked + label[for="darkmode-toggle"]::after {
  left: calc(100% - 22px);
  background: linear-gradient(180deg, #777, #3a3a3a);
}

label[for="darkmode-toggle"] svg {
  position: absolute;
  width: 12px;
  top: 6px;
  z-index: 2;
  pointer-events: none;
}

label[for="darkmode-toggle"] svg.sun { left: 6px; fill: #fff; }
label[for="darkmode-toggle"] svg.moon { right: 6px; fill: #7e7e7e; }

input#darkmode-toggle:checked + label[for="darkmode-toggle"] svg.sun { fill: #7e7e7e; }
input#darkmode-toggle:checked + label[for="darkmode-toggle"] svg.moon { fill: #fff; }
