/*
 * Shared QPhoto shell for public and operational pages.
 * Navigation and footer stay identical while each page keeps its own content.
 */

.qphoto-header {
  border-bottom: 1px solid var(--border);
  background: hsl(216 20% 97% / 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

[data-theme="dark"] .qphoto-header {
  background: hsl(220 18% 8% / 0.95);
}

.qphoto-header-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 11px clamp(16px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qphoto-brand {
  flex: 0 0 auto;
  color: var(--text);
  font: 700 18px/1 var(--font-display);
  letter-spacing: 0;
  text-decoration: none;
}

.qphoto-brand span { color: var(--accent); }

.qphoto-context {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.qphoto-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.qphoto-nav a {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.qphoto-nav a:hover,
.qphoto-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.qphoto-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.qphoto-langs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.qphoto-lang {
  min-width: 28px;
  min-height: 22px;
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: 700 10px/1 var(--font-sans);
}

.qphoto-lang:hover,
.qphoto-lang.active {
  background: var(--accent-bg);
  color: var(--accent);
}

.qphoto-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.qphoto-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qphoto-header a:focus-visible,
.qphoto-header button:focus-visible,
.qphoto-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.qphoto-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}

.qphoto-footer-inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 20px clamp(16px, 2.4vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr) auto;
  gap: 20px;
  align-items: start;
  font-size: 12px;
}

.qphoto-footer-brand { min-width: 0; }

.qphoto-footer-logo {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--text);
  font: 700 16px/1 var(--font-display);
  text-decoration: none;
}

.qphoto-footer-logo span { color: var(--accent); }

.qphoto-footer-brand p {
  max-width: 430px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.qphoto-footer-links,
.qphoto-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.qphoto-footer-meta {
  justify-content: flex-end;
  color: var(--text-muted);
  white-space: nowrap;
}

.qphoto-footer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.qphoto-footer-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 700px) {
  .qphoto-footer-inner { grid-template-columns: 1fr; gap: 14px; }
  .qphoto-footer-meta { justify-content: flex-start; white-space: normal; }
}

@media (max-width: 520px) {
  .qphoto-header-inner { flex-wrap: wrap; gap: 8px; }
  .qphoto-header-controls { margin-left: auto; }
  .qphoto-nav { order: 3; width: 100%; border-top: 1px solid var(--border); padding-top: 6px; }
  .qphoto-nav a { flex: 1; text-align: center; }
  .qphoto-context { display: none; }
}
