/* Oficiální sběr fotek obce — /fotky + /fotky/sprava */

.municipal-photos-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
  max-width: 44rem;
  margin: 0 auto;
}

.municipal-photos-page.role-manage-page {
  max-width: 56rem;
}

.municipal-photos-manage-chip {
  margin: 0;
}

.municipal-photos-hero .role-manage-lead {
  max-width: 40rem;
}

.municipal-photos-form-card {
  padding: var(--space-4, 1.25rem);
}

.municipal-photos-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
}

.municipal-photos-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.municipal-photos-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.municipal-photos-optional {
  font-weight: 400;
  color: var(--color-muted, #666);
  font-size: 0.85em;
}

.municipal-photos-form input[type="text"],
.municipal-photos-form input[type="email"],
.municipal-photos-form input[type="tel"],
.municipal-photos-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.9rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  background: var(--color-surface, #fff);
}

.municipal-photos-form input[type="file"] {
  font-size: 1rem;
  padding: 0.5rem 0;
}

.municipal-photos-file-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted, #666);
  line-height: 1.4;
}

.municipal-photos-pending-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
}

.municipal-photos-photo-card {
  margin: 0;
  padding: 0.75rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.12));
  background: var(--color-surface-soft, rgba(0, 0, 0, 0.03));
}

.municipal-photos-photo-card-inner {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.municipal-photos-photo-thumb {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: cover;
  border-radius: var(--radius-sm, 8px);
  background: #ddd;
  display: block;
}

.municipal-photos-photo-thumb--empty {
  background: #e8e8e8;
}

.municipal-photos-photo-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.municipal-photos-mini-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.municipal-photos-mini-label input {
  font-weight: 400;
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  background: var(--color-surface, #fff);
  width: 100%;
  box-sizing: border-box;
}

.municipal-photos-photo-remove {
  align-self: flex-start;
  margin-top: 0.15rem;
}

.municipal-photos-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 0.75rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
}

.municipal-photos-add-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.municipal-photos-upload-status,
.municipal-photos-submit-hint {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-brand, var(--color-primary));
}

.municipal-photos-upload-status.is-busy {
  color: var(--color-muted, #555);
}

.municipal-photos-photo-caption {
  font-weight: 600;
  color: inherit;
}

@media (max-width: 520px) {
  .municipal-photos-photo-card-inner {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .municipal-photos-photo-thumb {
    width: 4.5rem;
    height: 4.5rem;
  }
}

.municipal-photos-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3, 1rem);
}

@media (max-width: 640px) {
  .municipal-photos-contact-row {
    grid-template-columns: 1fr;
  }
}

.municipal-photos-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface-soft, rgba(0, 0, 0, 0.04));
  line-height: 1.45;
  font-size: 0.95rem;
}

.municipal-photos-consent input {
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.municipal-photos-submit {
  align-self: stretch;
  min-height: 3rem;
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.municipal-photos-form .auth-recaptcha {
  margin: 0.25rem 0;
}

.municipal-photos-flash {
  margin-bottom: 0.5rem;
}

.municipal-photos-success {
  padding: var(--space-4, 1.25rem);
  border: 2px solid var(--color-primary, var(--color-brand, #91201f));
  background: var(--color-surface, #fff);
}

.municipal-photos-success-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary, var(--color-brand, #91201f));
}

.municipal-photos-success-title {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  line-height: 1.25;
}

.municipal-photos-success-lead,
.municipal-photos-success-more {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.municipal-photos-success-more {
  margin-top: 0.75rem;
  color: var(--color-muted, #555);
}

/* Správa — oddělené barevné téma pro /fotky */
.municipal-photos-theme-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
  align-items: flex-start;
}

.municipal-photos-theme-card .hint {
  margin: 0;
}

.municipal-photos-theme-dialog {
  border: none;
  padding: 0;
  max-width: min(40rem, calc(100vw - 1.5rem));
  width: 100%;
  border-radius: 16px;
  background: transparent;
}

.municipal-photos-theme-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.municipal-photos-theme-dialog-inner {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 16px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, rgba(15, 23, 42, 0.1));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: min(88vh, 44rem);
  overflow: auto;
}

.municipal-photos-theme-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.municipal-photos-theme-dialog-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.municipal-photos-theme-dialog-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted, #64748b);
  padding: 0.1rem 0.35rem;
}

.municipal-photos-theme-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.municipal-photos-theme-fieldset {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.municipal-photos-theme-fieldset legend {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.municipal-photos-theme-mode {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.98rem;
  line-height: 1.35;
  cursor: pointer;
}

.municipal-photos-theme-mode input {
  margin-top: 0.2rem;
}

.municipal-photos-theme-custom[hidden] {
  display: none !important;
}

.municipal-photos-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.55rem;
}

.municipal-photos-theme-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface, #fff);
  cursor: pointer;
}

.municipal-photos-theme-option:has(input:checked) {
  border-color: var(--color-primary, var(--color-brand, #91201f));
  box-shadow: 0 0 0 1px var(--color-primary, var(--color-brand, #91201f));
}

.municipal-photos-theme-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.municipal-photos-theme-swatch {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.municipal-photos-theme-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.municipal-photos-theme-option-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.municipal-photos-theme-option-hint {
  font-size: 0.78rem;
  color: var(--color-muted, #666);
}

.municipal-photos-theme-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Správa — úprava hero textu na /fotky */
.municipal-photos-hero-edit {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
}

.municipal-photos-hero-edit .hint {
  margin: 0;
}

.municipal-photos-hero-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
  margin-top: 0.25rem;
}

.municipal-photos-hero-form .municipal-photos-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.municipal-photos-hero-form input[type="text"],
.municipal-photos-hero-form textarea {
  width: 100%;
  max-width: 40rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: var(--radius-md, 8px);
  font: inherit;
  background: var(--color-surface, #fff);
}

.municipal-photos-hero-form textarea {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.45;
}

.municipal-photos-hero-form .btn {
  align-self: flex-start;
}

/* Správa — neuložená (draft) alba */
.municipal-photos-draft-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
  margin-top: var(--space-2, 0.75rem);
}

.municipal-photos-draft-lead {
  margin: 0;
}

.municipal-photos-draft-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-primary, var(--color-brand, #91201f));
}

.municipal-photos-album-card--draft {
  border-style: dashed;
}

.municipal-photos-draft-banner-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.municipal-photos-draft-banner .hint {
  margin: 0;
}

/* Správa — seznam alb */
.municipal-photos-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
  align-items: flex-start;
}

.municipal-photos-toolbar--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 0.75rem);
}

.municipal-photos-toolbar-lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-muted, #555);
}

.municipal-photos-album-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 1rem);
}

.municipal-photos-album-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
  padding: var(--space-3, 1rem);
}

.municipal-photos-album-main {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--space-3, 1rem);
  align-items: center;
  color: inherit;
}

.municipal-photos-album-cover-link {
  display: block;
  text-decoration: none;
}

.municipal-photos-album-title a {
  color: inherit;
  text-decoration: none;
}

.municipal-photos-album-title a:hover {
  text-decoration: underline;
}

.municipal-photos-album-meta a {
  font-weight: 600;
  color: var(--color-brand, var(--color-primary));
}

.municipal-photos-album-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.municipal-photos-album-actions form {
  margin: 0;
  display: inline;
}

.municipal-photos-btn-danger {
  color: var(--color-danger, #b42318);
}

.municipal-photos-album-cover {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: var(--radius-md, 10px);
  background: var(--color-surface-soft, #eee);
}

.municipal-photos-album-cover--empty {
  display: block;
}

.municipal-photos-album-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.municipal-photos-album-meta,
.municipal-photos-album-contact {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted, #555);
  line-height: 1.4;
}

.municipal-photos-album-contact {
  margin-top: 0.25rem;
}

/* Detail alba */
.municipal-photos-section-title {
  margin: 0 0 var(--space-2, 0.75rem);
  font-size: 1.1rem;
}

.municipal-photos-section-chip {
  display: inline-flex;
  margin: 0 0 var(--space-2, 0.75rem);
}

.municipal-photos-detail-photos {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 0.75rem);
}

.municipal-photos-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: var(--space-3, 1rem);
}

.municipal-photos-lightbox-hint {
  margin: 0 0 var(--space-2, 0.75rem);
  padding: 0.65rem 0.9rem;
}

.municipal-photos-photo {
  margin: 0;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.municipal-photos-photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
}

.municipal-photos-photo-open:focus-visible {
  outline: 2px solid var(--color-primary, var(--color-brand));
  outline-offset: 2px;
}

.municipal-photos-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm, 8px);
  display: block;
}

.municipal-photos-photo figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
  color: var(--color-muted, #555);
  line-height: 1.3;
}

.municipal-photos-danger .hint {
  margin-bottom: var(--space-2, 0.75rem);
}

@media (max-width: 520px) {
  .municipal-photos-album-main {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .municipal-photos-album-cover {
    width: 5rem;
    height: 5rem;
  }
}
