/* Sania & Hossein's Wedding Memories — mobile-first styles */

:root {
  --color-white: #ffffff;
  --color-soft-gold: #c4a574;
  --color-soft-gold-dark: #a8884f;
  --color-warm-beige: #f3ebe0;
  --color-warm-beige-deep: #e8dccb;
  --color-light-gray: #f0eeeb;
  --color-text: #3d3832;
  --color-text-muted: #7a736a;
  --color-danger: #b54a4a;
  --color-danger-bg: #f8ecec;
  --color-success: #5a7a5a;
  --shadow-soft: 0 8px 28px rgba(61, 56, 50, 0.08);
  --radius: 16px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

html[lang="fa"] {
  --font-display: "Vazirmatn", Tahoma, sans-serif;
  --font-body: "Vazirmatn", Tahoma, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(ellipse at top, var(--color-warm-beige) 0%, var(--color-light-gray) 55%, #ebe7e1 100%);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

.lang-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem 0;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.lang-btn.is-active {
  color: var(--color-soft-gold-dark);
  font-weight: 700;
}

.lang-sep {
  color: var(--color-warm-beige-deep);
  user-select: none;
}

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.5rem;
  flex: 1;
}

.hero {
  text-align: center;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 2px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hero.drag-over {
  border-color: var(--color-soft-gold);
  background: #fffaf3;
}

.hero-ornament,
.hero-heart {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1;
}

.hero-title {
  margin: 0.85rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6vw, 2.45rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

html[lang="fa"] .hero-title {
  letter-spacing: 0;
  line-height: 1.55;
}

.hero-text {
  margin: 0 auto 0.65rem;
  max-width: 36ch;
  color: var(--color-text-muted);
  font-size: 1.02rem;
}

html[lang="fa"] .hero-text {
  max-width: 42ch;
  line-height: 1.85;
}

.hero-heart {
  margin: 0.85rem 0 1.5rem;
}

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.drop-hint {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled,
.btn:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-soft-gold);
  color: var(--color-white);
}

.btn-primary:hover:not(:disabled):not(:has(input:disabled)) {
  background: var(--color-soft-gold-dark);
}

.btn-secondary {
  background: var(--color-warm-beige);
  color: var(--color-text);
  border: 1px solid var(--color-warm-beige-deep);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-warm-beige-deep);
}

.btn-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-radius: 12px;
  min-height: 2.5rem;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  border-radius: 12px;
}

.my-uploads,
.upload-queue {
  margin-top: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-soft);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  text-align: center;
}

.empty-state {
  margin: 0;
  text-align: center;
  color: var(--color-text-muted);
  padding: 1rem 0.5rem 0.5rem;
  line-height: 1.7;
}

.upload-list,
.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-item,
.queue-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--color-light-gray);
  border-radius: 12px;
}

html[dir="rtl"] .upload-meta {
  text-align: right;
}

html[dir="rtl"] .queue-item .upload-name,
html[dir="rtl"] .queue-status {
  text-align: right;
}

.upload-preview {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: var(--color-warm-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-name {
  margin: 0 0 0.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

.upload-time {
  margin: 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.queue-item {
  grid-template-columns: 1fr auto;
}

.progress-wrap {
  margin-top: 0.45rem;
  height: 8px;
  border-radius: 999px;
  background: var(--color-warm-beige-deep);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--color-soft-gold);
  transition: width 0.1s linear;
}

.queue-status {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.queue-status.error {
  color: var(--color-danger);
}

.queue-status.done {
  color: var(--color-success);
}

.site-footer {
  text-align: center;
  padding: 1rem 1rem 1.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer .footer-line {
  margin: 0;
}

.site-footer .footer-credit {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Admin */
.admin-page {
  width: min(100%, 860px);
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.admin-title {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
}

.admin-sub {
  margin: 0.35rem 0 0;
  text-align: left;
}

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.stat {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
}

.stat-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.stat-value {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.search-form {
  display: flex;
  flex: 1;
  gap: 0.5rem;
  min-width: 220px;
}

.field-label {
  display: block;
  text-align: left;
  margin: 0 0 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.field-input {
  width: 100%;
  min-height: 2.85rem;
  border: 1px solid var(--color-warm-beige-deep);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-white);
  color: var(--color-text);
}

.admin-login-form {
  margin-top: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-error {
  margin: 0.75rem 0 0;
  color: var(--color-danger);
  font-size: 0.95rem;
}

.admin-item {
  grid-template-columns: 72px 1fr;
}

.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

@media (min-width: 480px) {
  .upload-actions .btn {
    min-width: 200px;
  }

  .admin-item {
    grid-template-columns: 72px 1fr auto;
  }

  .admin-actions {
    grid-column: auto;
    flex-direction: column;
  }
}
