:root {
  --photobomb-blue: #003595;
  --photobomb-accent: #f4b942;
  --bs-primary: #003595;
  --bs-primary-rgb: 0, 53, 149;
  --bs-link-color: #003595;
  --bs-link-hover-color: #0759b8;
  --bs-body-color: #172033;
  --bs-body-bg: #f5f7fb;
  --bs-border-radius: 0.35rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #172033;
  font-family: Aptos, Calibri, sans-serif;
}

a,
.btn-link {
  color: #003595;
}

h1,
h2,
h3,
.brand-name {
  color: #172033;
  font-family: "Trebuchet MS", Aptos, sans-serif;
  letter-spacing: 0;
}

h1:focus {
  outline: none;
}

.btn {
  border-radius: 0.35rem;
  font-weight: 700;
}

.btn-primary {
  background: #003595;
  border-color: #003595;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #0759b8;
  border-color: #0759b8;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(7, 89, 184, 0.25);
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  background: #003595;
  border-bottom: 4px solid #f4b942;
  color: #ffffff;
}

.site-header__inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  margin: 0 auto;
  max-width: 90rem;
  min-height: 4.5rem;
  padding: 0.7rem clamp(1rem, 3vw, 2.5rem);
}

.site-brand {
  color: #ffffff;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-brand:hover {
  color: #ffffff;
}

.brand-name {
  color: inherit;
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.brand-tagline {
  color: #dceaff;
  display: block;
  font-size: 0.74rem;
  margin-top: 0.3rem;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  cursor: pointer;
  display: none;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.55rem 0.7rem;
  text-transform: uppercase;
}

.site-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 0.25rem;
}

.site-nav__account {
  align-items: center;
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.site-nav .nav-link {
  background: transparent;
  border: 0;
  border-radius: 0.25rem;
  color: #dceaff;
  display: block;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.65rem 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.site-nav button.nav-link {
  width: 100%;
}

.site-main {
  margin: 0 auto;
  max-width: 90rem;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem) 4rem;
}

.page-heading {
  align-items: end;
  border-bottom: 1px solid #d9dfeb;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.page-heading h1 {
  color: #003595;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0;
}

.page-heading p {
  color: #657086;
  margin: 0.4rem 0 0;
}

.empty-state {
  background: #ffffff;
  border: 1px solid #d9dfeb;
  border-left: 5px solid #f4b942;
  max-width: 48rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.empty-state h2 {
  color: #003595;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.empty-state p {
  color: #657086;
  margin: 0;
}

.loading-state {
  color: #657086;
  padding: 2rem 0;
}

.editor-panel {
  background: #ffffff;
  border: 1px solid #d9dfeb;
  max-width: 42rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.field-group {
  margin-bottom: 1.5rem;
}

.field-group label {
  display: block;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.field-group input[type=file] {
  background: #f5f7fb;
  border: 1px dashed #9ba8bd;
  display: block;
  max-width: 100%;
  padding: 1rem;
  width: 100%;
}

.field-hint {
  color: #657086;
  display: block;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.photo-card {
  background: #ffffff;
  border: 1px solid #d9dfeb;
  min-width: 0;
}

.photo-card__image {
  display: block;
  overflow: hidden;
}

.photo-card__image img {
  aspect-ratio: 4/3;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
  width: 100%;
}

.photo-card__image:hover img {
  transform: scale(1.025);
}

.photo-card__body {
  padding: 1rem;
}

.photo-card__body h2,
.moderation-item h2 {
  font-size: 1rem;
  margin: 0 0 0.65rem;
  overflow-wrap: anywhere;
}

.photo-card__body h2 a {
  color: #172033;
  text-decoration: none;
}

.photo-card__body h2 a:hover {
  color: #003595;
}

.photo-card__body .btn {
  margin-top: 1rem;
  width: 100%;
}

.status-row,
.action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.status-badge {
  background: #e8edf5;
  border: 1px solid #c8d1df;
  color: #3f4b60;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.45rem;
  text-transform: uppercase;
}

.status-badge--pending {
  background: #fff4cc;
  border-color: #ead186;
  color: #765300;
}

.status-badge--live {
  background: #dcf3e8;
  border-color: #99d2b7;
  color: #16734a;
}

.status-badge--inactive {
  background: #edf0f4;
  border-color: #c8ced8;
  color: #5c6574;
}

.status-badge--nsfw {
  background: #fbe5e8;
  border-color: #e5a5ad;
  color: #b42332;
}

.moderation-list {
  border-top: 1px solid #d9dfeb;
}

.moderation-item {
  align-items: stretch;
  background: #ffffff;
  border-bottom: 1px solid #d9dfeb;
  display: grid;
  gap: 1rem;
  grid-template-columns: 10rem minmax(0, 1fr);
  padding: 1rem;
}

.moderation-item > img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}

.moderation-item__details {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.moderation-item__details p {
  color: #657086;
  font-size: 0.85rem;
  margin: 0 0 0.65rem;
  overflow-wrap: anywhere;
}

.action-row {
  justify-content: flex-end;
}

.section-heading {
  color: #003595;
  font-size: 1.25rem;
  margin: 2rem 0 1rem;
}

.admin-section {
  border-top: 1px solid #d9dfeb;
  margin-top: 3rem;
  padding-top: 2rem;
}

.section-heading-row {
  margin-bottom: 1rem;
}

.section-heading-row h2 {
  color: #003595;
  font-size: 1.4rem;
  margin: 0;
}

.section-heading-row p {
  color: #657086;
  margin: 0.35rem 0 0;
}

.composer-layout {
  align-items: start;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
}

.composer-stage {
  aspect-ratio: var(--photo-aspect);
  background-color: #dfe4ec;
  background-image: linear-gradient(45deg, #cfd6e1 25%, transparent 25%), linear-gradient(-45deg, #cfd6e1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cfd6e1 75%), linear-gradient(-45deg, transparent 75%, #cfd6e1 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  border: 1px solid #d9dfeb;
  justify-self: center;
  line-height: 0;
  max-height: 75vh;
  overflow: hidden;
  position: relative;
  width: min(100%, 75vh * var(--photo-aspect));
}

.composer-stage__photo {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.composer-stage__overlay {
  bottom: 0;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  width: var(--overlay-width, 55%);
}

.composer-stage__overlay--left {
  left: 0;
  object-position: left bottom;
}

.composer-stage__overlay--center {
  left: 50%;
  object-position: center bottom;
  transform: translateX(-50%);
}

.composer-stage__overlay--right {
  object-position: right bottom;
  right: 0;
}

.size-control {
  align-items: center;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: auto minmax(0, 1fr) 3.25rem;
  margin-bottom: 1rem;
}

.size-control output {
  color: #003595;
  font-weight: 800;
  text-align: right;
}

.overlay-picker {
  background: #ffffff;
  border: 1px solid #d9dfeb;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 16rem);
  overflow: hidden;
  padding: 1rem;
  position: sticky;
  top: 1rem;
}

.overlay-picker h2,
.overlay-upload-panel h3 {
  color: #003595;
  font-size: 1rem;
  margin: 0 0 1rem;
}

.position-control {
  align-items: center;
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.position-control__options {
  border: 1px solid #d9dfeb;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.position-control__option {
  background: #ffffff;
  border: 0;
  border-left: 1px solid #d9dfeb;
  color: #003595;
  min-height: 2.25rem;
  padding: 0.35rem 0.65rem;
}

.position-control__option:first-child {
  border-left: 0;
}

.position-control__option--selected {
  background: #003595;
  color: #fff;
}

.overlay-options {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.overlay-option {
  align-items: center;
  background: #f5f7fb;
  border: 2px solid transparent;
  color: #172033;
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.5rem;
}

.overlay-option:hover,
.overlay-option--selected {
  border-color: #003595;
}

.overlay-option__preview,
.overlay-admin-item__preview {
  background-color: #ffffff;
  background-image: linear-gradient(45deg, #d8dde6 25%, transparent 25%), linear-gradient(-45deg, #d8dde6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d8dde6 75%), linear-gradient(-45deg, transparent 75%, #d8dde6 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  display: grid;
  place-items: center;
}

.overlay-option__preview {
  aspect-ratio: 4/3;
  width: 100%;
}

.overlay-option__preview img {
  max-height: 5.5rem;
  max-width: 100%;
}

.composer-download {
  flex-shrink: 0;
  margin-top: 1rem;
  width: 100%;
}

.overlay-admin-layout {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
}

.overlay-upload-panel {
  max-width: none;
}

.overlay-admin-list {
  border-top: 1px solid #d9dfeb;
}

.overlay-admin-item {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d9dfeb;
  display: grid;
  gap: 1rem;
  grid-template-columns: 7rem minmax(0, 1fr);
  padding: 0.75rem;
}

.overlay-admin-item__preview {
  aspect-ratio: 4/3;
}

.overlay-admin-item__preview img {
  max-height: 5rem;
  max-width: 100%;
}

.overlay-admin-item__details {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-width: 0;
}

.overlay-default-size {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.overlay-default-size label {
  font-size: 0.78rem;
  font-weight: 800;
}

.overlay-default-size input {
  width: 5rem;
}

.overlay-admin-item h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.status-pending {
  color: #765300;
}

.status-live {
  color: #16734a;
}

.validation-message,
.text-danger {
  color: #b42332 !important;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid #16734a;
}

.invalid {
  outline: 1px solid #b42332;
}

.blazor-error-boundary {
  background: #b42332;
  color: #ffffff;
  padding: 1rem;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

#blazor-error-ui {
  background: #fff4cc;
  bottom: 0;
  box-shadow: 0 -1px 4px rgba(23, 32, 51, 0.2);
  color: #172033;
  display: none;
  left: 0;
  padding: 0.75rem 3rem 0.75rem 1rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 1rem;
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
  }
  .nav-toggle-label {
    display: block;
    margin-left: auto;
  }
  .site-nav {
    align-items: stretch;
    display: none;
    flex-basis: 100%;
    flex-direction: column;
  }
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }
  .site-nav__account {
    align-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    flex-direction: column;
    margin: 0.5rem 0 0;
    padding-top: 0.5rem;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
  }
  .moderation-item {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
  .moderation-item__details {
    align-items: stretch;
    flex-direction: column;
  }
  .action-row {
    justify-content: flex-start;
  }
  .composer-layout,
  .overlay-admin-layout {
    grid-template-columns: 1fr;
  }
  .overlay-picker {
    max-height: none;
    overflow: visible;
    position: static;
  }
  .overlay-options {
    overflow: visible;
  }
}
@media (max-width: 540px) {
  .moderation-item {
    grid-template-columns: 1fr;
  }
  .moderation-item > img {
    max-width: 12rem;
  }
  .overlay-admin-item {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
  .overlay-admin-item__details {
    align-items: stretch;
    flex-direction: column;
  }
}
