/* ════════════════════════════════════════════
   THMANYAH CUSTOM FONTS
   ════════════════════════════════════════════ */
@font-face {
  font-family: 'ThmanyahSans';
  src: url('../fonts/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ThmanyahSans';
  src: url('../fonts/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ThmanyahSerif';
  src: url('../fonts/thmanyahseriftext-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'ThmanyahSerif';
  src: url('../fonts/thmanyahseriftext-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Font utility classes */
.f-thmanyahsans  { font-family: 'ThmanyahSans',  Tajawal, sans-serif; }
.f-thmanyahserif { font-family: 'ThmanyahSerif', Amiri,   serif; }

/* ════════════════════════════════════════════
   greetings.kscdr.org — Main Stylesheet
   ════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --cream:      #f0ebe3;
  --cream-mid:  #e8e1d8;
  --cream-dark: #ddd5c8;
  --red:        #9b1f22;
  --red-hover:  #7e1719;
  --red-light:  #f9edec;
  --brown:      #6b5c4e;
  --dark:       #231e1b;
  --border:     #d4cab8;
  --footer-bar: #8a7e74;
  --white:      #ffffff;
  --page-bg:    #cfc8bf;
  --box-w:      980px;
  --radius:     12px;
  --shadow:     0 2px 14px rgba(0,0,0,.08);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  background: var(--page-bg);
  min-height: 100vh;
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── BOXED WRAPPER ── */
.wrap {
  max-width: var(--box-w);
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 60px rgba(0,0,0,.22);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════════════
   TOP BAR
   ════════════════════════════════════════════ */
.topbar {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 6px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-date {
  font-size: 12px;
  color: var(--brown);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-date svg {
  width: 13px; height: 13px;
  stroke: var(--brown);
  fill: none;
  flex-shrink: 0;
}
.topbar-socials { display: flex; gap: 7px; }
.soc {
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--cream-mid);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown);
  font-size: 10px; font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
}
.soc:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
.site-header {
  background: var(--cream);
  border-bottom: 2px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
}
.header-brand { flex-shrink: 0; }
.logo-img { height: 68px; width: auto; display: block; }
.header-sep {
  width: 1px; height: 54px;
  background: var(--border);
  margin: 0 24px;
  flex-shrink: 0;
}
.header-title-block { flex: 1; }
.header-site-title { font-size: 22px; font-weight: 800; color: var(--dark); line-height: 1.2; }
.header-site-sub   { font-size: 13px; color: var(--brown); margin-top: 5px; font-weight: 400; }

/* ════════════════════════════════════════════
   BREADCRUMB
   ════════════════════════════════════════════ */
.breadcrumb {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--brown);
}
.breadcrumb a { color: var(--red); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--border); font-size: 16px; }
.breadcrumb-current { font-weight: 600; color: var(--dark); }

/* ════════════════════════════════════════════
   HOMEPAGE — OCCASIONS GRID
   ════════════════════════════════════════════ */
.home-main { flex: 1; background: var(--white); padding: 44px 28px 56px; }

.section-head { text-align: center; margin-bottom: 36px; }
.section-head h1 { font-size: 26px; font-weight: 800; color: var(--dark); }
.section-head p  { font-size: 14px; color: var(--brown); margin-top: 8px; }
.head-line { width: 52px; height: 3px; background: var(--red); border-radius: 2px; margin: 12px auto 0; }

.occasions-grid {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
/* Center last 2 cards in the 3-col grid */
.occasion-card:nth-child(4) { grid-column: 1; }
.occasion-card:nth-child(5) { grid-column: 2; }

.occasion-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: border-color .22s, transform .22s, box-shadow .22s;
  text-decoration: none;
  display: block;
}
.occasion-card:hover {
  border-color: var(--red);
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(155,31,34,.16);
}
.card-thumb {
  height: 155px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.55) 0%, transparent 70%);
}
.card-thumb .icon { font-size: 52px; position: relative; z-index: 1; }

/* Occasion thumb backgrounds */
.bg-eid-fitr  { background: linear-gradient(145deg, #f5efe5 0%, #e8d5a8 100%); }
.bg-eid-adha  { background: linear-gradient(145deg, #e5f0f5 0%, #a8cfe0 100%); }
.bg-national  { background: linear-gradient(145deg, #e5f2e8 0%, #90cc9a 100%); }
.bg-founder   { background: linear-gradient(145deg, #f5ede0 0%, #d4aa6a 100%); }
.bg-flag      { background: linear-gradient(145deg, #e5f5f0 0%, #7abfb5 100%); }
.bg-default   { background: linear-gradient(145deg, #f0ebe3 0%, #d4cab8 100%); }

.card-foot {
  padding: 14px 16px;
  background: var(--cream);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-label { font-size: 15px; font-weight: 700; color: var(--dark); }
.card-arrow {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, border-color .18s;
  flex-shrink: 0;
}
.card-arrow svg { width: 13px; height: 13px; stroke: var(--red); fill: none; stroke-width: 2.5; }
.occasion-card:hover .card-arrow { background: var(--red); border-color: var(--red); }
.occasion-card:hover .card-arrow svg { stroke: #fff; }

/* ════════════════════════════════════════════
   CARD PAGE — BUILDER
   ════════════════════════════════════════════ */
.occ-banner {
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
  display: flex; align-items: center; gap: 16px;
}
.occ-icon  { font-size: 40px; line-height: 1; }
.occ-info h2 { font-size: 20px; font-weight: 800; color: var(--dark); }
.occ-info p  { font-size: 13px; color: var(--brown); margin-top: 3px; }

.builder {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  align-items: start;
}

/* Steps column */
.steps-col {
  padding: 24px 28px;
  background: #f8f5f1;
  border-left: 1px solid var(--border);
}

/* Preview column */
.preview-col {
  padding: 24px 20px;
  background: var(--white);
  position: sticky;
  top: 0;
  height: fit-content;
  align-self: start;
}

/* Step blocks */
.step-block {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 16px;
}
.step-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-title { font-size: 14px; font-weight: 700; color: var(--dark); }

/* Template grid */
.templates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-card {
  border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color .2s, transform .15s;
  position: relative;
}
.tpl-card:hover { transform: scale(1.03); }
.tpl-card.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(155,31,34,.15); }
.tpl-card.selected::after {
  content: '✓';
  position: absolute; top: 6px; left: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--red);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 18px; text-align: center;
}
.tpl-thumb {
  height: 80px;
  display: flex; align-items: flex-end; padding: 6px;
  overflow: hidden; position: relative;
}
.tpl-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.tpl-name {
  position: relative; z-index: 1;
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

/* Greeting texts */
.texts-list { display: flex; flex-direction: column; gap: 8px; }
.text-opt {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 12px 36px;
  font-size: 13px; line-height: 1.85;
  cursor: pointer; text-align: right;
  transition: border-color .2s, background .2s;
  background: var(--white); color: var(--dark);
  position: relative;
}
.text-opt:hover  { border-color: var(--red); background: var(--red-light); }
.text-opt.selected { border-color: var(--red); background: var(--red-light); }
.text-opt.selected::before {
  content: '✓';
  position: absolute; top: 50%; left: 12px;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 18px; text-align: center;
}

/* Name input */
.name-wrap input {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: 'Tajawal', sans-serif; font-size: 15px;
  direction: rtl; outline: none;
  color: var(--dark); background: var(--white);
  transition: border-color .2s;
}
.name-wrap input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(155,31,34,.08); }

/* Font picker */
.font-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.font-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 14px;
  background: var(--white); color: var(--dark);
  transition: border-color .2s, background .2s;
}
.font-btn:hover    { border-color: var(--red); background: var(--red-light); }
.font-btn.selected { border-color: var(--red); background: var(--red-light); color: var(--red); font-weight: 700; }
.f-tajawal { font-family: 'Tajawal', sans-serif; }
.f-amiri   { font-family: 'Amiri', serif; }
.f-cairo   { font-family: 'Cairo', sans-serif; }

/* Preview column */
.preview-label {
  font-size: 11px; font-weight: 700;
  color: var(--brown);
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 12px;
}
.orientation-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.otab {
  flex: 1; padding: 8px;
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif; font-size: 13px; font-weight: 600;
  background: var(--white); color: var(--brown);
  text-align: center;
  transition: border-color .2s, background .2s, color .2s;
}
.otab:hover  { border-color: var(--red); color: var(--red); }
.otab.active { border-color: var(--red); background: var(--red-light); color: var(--red); }

.canvas-container { display: flex; justify-content: center; margin-bottom: 14px; }
#card-canvas {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,.1);
  max-width: 100%;
  display: block;
}

.dl-btns { display: flex; flex-direction: column; gap: 8px; }
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: 8px; border: none;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 700;
  width: 100%;
  transition: opacity .2s;
}
.dl-btn:hover { opacity: .86; }
.dl-v { background: var(--red); color: #fff; }
.dl-h { background: #3a3030; color: #fff; }

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */
.footer-top {
  background: var(--cream);
  border-top: 1px solid var(--border);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.footer-brand { display: flex; align-items: center; }
.footer-logo-img { height: 52px; width: auto; display: block; }
.footer-links { list-style: none; display: flex; gap: 20px; justify-content: center; }
.footer-links a { font-size: 13px; color: var(--brown); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--red); }
.footer-socials { display: flex; gap: 8px; }
.fsoc {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream-mid); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown); font-size: 10px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .18s, color .18s, border-color .18s;
}
.fsoc:hover { background: var(--red); color: #fff; border-color: var(--red); }
.footer-bottom {
  background: var(--footer-bar);
  padding: 11px 28px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,.8); }
.footer-url  { font-size: 11px; color: rgba(255,255,255,.8); }

/* ════════════════════════════════════════════
   ORIENTATION TABS + PLATFORM HINT
   ════════════════════════════════════════════ */
.orientation-wrap { margin-bottom: 14px; }
.orientation-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.otab {
  flex: 1; padding: 8px 10px;
  border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif; font-size: 13px; font-weight: 600;
  background: var(--white); color: var(--brown);
  text-align: center;
  transition: border-color .2s, background .2s, color .2s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.otab svg { width: 12px; height: 12px; stroke: currentColor; fill: none; flex-shrink: 0; }
.otab:hover  { border-color: var(--red); color: var(--red); }
.otab.active { border-color: var(--red); background: var(--red-light); color: var(--red); }

.platform-hint {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 8px;
  background: var(--cream); border-radius: 6px;
  border: 1px solid var(--border); min-height: 26px;
}
.hint-label  { font-size: 10px; color: var(--brown); font-weight: 600; flex-shrink: 0; }
.hint-divider{ width: 1px; height: 12px; background: var(--border); flex-shrink: 0; }
.plt-icons   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plt {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 600; color: var(--brown); white-space: nowrap;
}
.plt svg     { width: 11px; height: 11px; flex-shrink: 0; }
.plt-wa svg  { fill: #25D366; }
.plt-ig svg  { fill: #C13584; }
.plt-sn svg  { fill: #FFFC00; stroke: #b8a800; stroke-width: .5; }
.plt-tw svg  { fill: #1DA1F2; }
.plt-li svg  { fill: #0077B5; }
.plt-fb svg  { fill: #1877F2; }

/* ════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
   ════════════════════════════════════════════ */

/* ── Tablet: 768px ── */
@media (max-width: 768px) {

  /* Boxed full width */
  .wrap { box-shadow: none; }

  /* Topbar */
  .topbar { padding: 6px 16px; }

  /* Header */
  .site-header { padding: 12px 16px; }
  .logo-img    { height: 54px; }
  .header-sep  { margin: 0 14px; height: 44px; }
  .header-site-title { font-size: 18px; }
  .header-site-sub   { font-size: 12px; }

  /* Breadcrumb */
  .breadcrumb  { padding: 8px 16px; font-size: 12px; }

  /* Occasion banner */
  .occ-banner  { padding: 14px 16px; }
  .occ-icon    { font-size: 30px; }
  .occ-info h2 { font-size: 17px; }

  /* Builder — stack vertically, steps TOP preview BOTTOM */
  .builder {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
  }
  .steps-col {
    order: 1;
    width: 100% !important;
    padding: 16px;
    border-left: none;
  }
  .preview-col {
    order: 2;
    width: 100% !important;
    padding: 16px;
    position: static !important;
    height: auto !important;
    align-self: auto !important;
    border-top: 2px solid var(--border);
    background: var(--cream);
  }

  /* Occasions grid — 2 cols on tablet */
  .occasions-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .occasion-card:nth-child(4) { grid-column: auto; }
  .occasion-card:nth-child(5) { grid-column: auto; }

  /* Templates — 3 cols still fine */
  .templates-grid { grid-template-columns: repeat(3, 1fr); }

  /* Greeting texts — 1 col */
  .texts-list { grid-template-columns: 1fr; }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
    padding: 20px 16px;
  }
  .footer-brand   { justify-content: center; }
  .footer-links   { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer-socials { justify-content: center; }
  .footer-bottom  { padding: 10px 16px; flex-direction: column; gap: 4px; text-align: center; }

  /* Home main */
  #page-home, .home-main { padding: 24px 16px 40px; }
}

/* ── Mobile: 480px ── */
@media (max-width: 480px) {

  /* Topbar — hide date on very small screens */
  .topbar-date { display: none; }

  /* Header — tighter */
  .site-header { padding: 10px 14px; gap: 0; }
  .logo-img    { height: 46px; }
  .header-sep  { margin: 0 12px; height: 38px; }
  .header-site-title { font-size: 16px; }
  .header-site-sub   { font-size: 11px; margin-top: 3px; }

  /* Occasions — 1 col on very small */
  .occasions-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-thumb     { height: 110px; }
  .card-thumb .icon { font-size: 36px; }
  .card-label     { font-size: 13px; }

  /* Preview col — canvas centered nicely */
  .preview-col { padding: 14px 12px; }
  .canvas-container { margin-bottom: 10px; }

  /* Orientation tabs */
  .otab { font-size: 12px; padding: 7px 8px; }

  /* Steps */
  .steps-col   { padding: 12px; }
  .step-block  { padding: 14px; margin-bottom: 12px; }
  .step-title  { font-size: 13px; }

  /* Templates — 3 cols, smaller thumbs */
  .tpl-thumb { height: 64px; }

  /* Font buttons */
  .font-btn { padding: 7px 14px; font-size: 13px; }

  /* Download button */
  .dl-btn { font-size: 13px; padding: 10px; }

  /* Section heading */
  .section-head h1 { font-size: 20px; }
  .section-head p  { font-size: 13px; }

  /* Occ banner */
  .occ-banner { padding: 12px 14px; gap: 10px; }
  .occ-icon   { font-size: 26px; }
  .occ-info h2{ font-size: 15px; }
  .occ-info p { font-size: 12px; }

  /* Breadcrumb */
  .breadcrumb { padding: 8px 14px; }
}

/* ════════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════════ */
.admin-wrap {
  max-width: 900px; margin: 40px auto; padding: 0 20px;
  font-family: 'Tajawal', sans-serif; direction: rtl;
}
.admin-header {
  background: var(--dark); color: #fff;
  padding: 16px 24px; border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 18px; font-weight: 700; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-nav a {
  padding: 8px 16px; border-radius: 8px;
  background: var(--cream); border: 1px solid var(--border);
  color: var(--dark); text-decoration: none; font-size: 13px; font-weight: 600;
  transition: background .18s, border-color .18s;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--red); color: #fff; border-color: var(--red); }
.admin-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.admin-card h2 { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-row input[type=text],
.form-row input[type=password],
.form-row select,
.form-row textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: 'Tajawal', sans-serif; font-size: 14px;
  direction: rtl; outline: none; color: var(--dark);
  transition: border-color .2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--red); }
.form-row textarea { height: 90px; resize: vertical; }
.form-row input[type=file] { font-family: 'Tajawal', sans-serif; font-size: 13px; }
.btn-save {
  padding: 10px 28px; border-radius: 8px; border: none;
  background: var(--red); color: #fff;
  font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.btn-save:hover { background: var(--red-hover); }
.btn-danger {
  padding: 6px 14px; border-radius: 6px; border: none;
  background: #c0392b; color: #fff;
  font-family: 'Tajawal', sans-serif; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: var(--cream); padding: 10px 12px; text-align: right; font-weight: 700; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: var(--cream); }
.badge-on  { background: #d4edda; color: #155724; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-off { background: #f8d7da; color: #721c24; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.alert-success { background: #d4edda; color: #155724; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.alert-error   { background: #f8d7da; color: #721c24; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }

/* ════════════════════════════════════════════
   DIMMED OCCASIONS
   ════════════════════════════════════════════ */
.occasion-card.dimmed {
  filter: grayscale(85%) brightness(0.78);
  opacity: 0.62;
}
.occasion-card.dimmed:hover {
  filter: grayscale(20%) brightness(0.95);
  opacity: 0.92;
  border-color: #aaa;
}

/* ════════════════════════════════════════════
   COPY LINK
   ════════════════════════════════════════════ */
.copy-link-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  width: 100%;
}
.copy-link-url {
  font-size: 11px; color: var(--brown);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; flex: 1;
  direction: ltr; text-align: left;
}
.copy-btn {
  width: 28px; height: 28px;
  border: none; background: none;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  color: #fff; border-radius: 6px;
  background: var(--red);
  transition: background .2s, color .2s;
  flex-shrink: 0;
  padding: 0;
}
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn:hover { background: var(--red); color: #fff; }
.copy-toast {
  position: absolute; top: -32px; left: 50%;
  transform: translateX(-50%);
  background: var(--dark); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.copy-toast.show { opacity: 1; }

/* ════════════════════════════════════════════
   SHARE BUTTONS
   ════════════════════════════════════════════ */
.share-row {
  margin-top: 8px;
  background: var(--cream);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.share-label {
  font-size: 11px; font-weight: 700;
  color: var(--brown); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-size: 12px; font-weight: 700;
  text-decoration: none; transition: opacity .2s;
  flex-shrink: 0;
}
.share-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.share-btn:hover { opacity: .85; }
.share-wa { background: #25D366; color: #fff; }
.share-tw { background: #000;    color: #fff; }
.share-li { background: #0077B5; color: #fff; }

/* ════════════════════════════════════════════
   CANVAS ZOOM HINT
   ════════════════════════════════════════════ */
.canvas-container { position: relative; }
.canvas-zoom-hint {
  text-align: center; font-size: 11px;
  color: var(--brown); margin-top: 6px;
  opacity: .65; display: block;
  width: 100%; cursor: pointer;
}

/* ════════════════════════════════════════════
   FULLSCREEN OVERLAY
   ════════════════════════════════════════════ */
.fs-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.85);
  align-items: center; justify-content: center;
}
.fs-overlay.open { display: flex; }
.fs-inner {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  padding: 20px;
  max-width: 95vw; max-height: 95vh;
}
.fs-close {
  position: absolute; top: -8px; left: -8px;
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--dark);
  border: none; cursor: pointer;
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
#fs-canvas {
  max-width: 90vw; max-height: 82vh;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}
.fs-hint {
  font-size: 12px; color: rgba(255,255,255,.5);
}

/* ── Share section ── */
.share-section {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.share-section-label {
  font-size: 12px; font-weight: 600;
  color: var(--brown); margin-bottom: 7px;
  text-align: center;
}
