/* ==========================================================================
   Kitchen closed - festival cards + the Manager's form (2026-11-08).
   IDENTICAL copy in both apps (public/css/kitchen.css and
   pg-tenant-portal/public/css/kitchen.css). Markup: js/kitchen.js.

   Responsive by CONTAINER width (the card sits in a phone column, a tablet grid
   or a wide laptop dashboard), so it never depends on the screen size alone:
     < 340px  stacked: art above, smaller type
     >= 520px roomier padding, bigger art and greeting
   Older browsers without container queries get the narrow-safe default.
   ========================================================================== */

.kc-card {
  container-type: inline-size; container-name: kc;
  position: relative; overflow: hidden; isolation: isolate;
  margin: 0 0 16px; border-radius: 22px;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 42, .45), 0 2px 6px rgba(15, 23, 42, .06);
  --kc-ink: #14205a; --kc-sub: #46518a; --kc-acc: #3b63e8;
  background: linear-gradient(155deg, #eef2ff 0%, #e3e9ff 60%, #e6fbf5 100%);
  color: var(--kc-ink);
  -webkit-user-select: none; user-select: none;
}
.kc-in { padding: 16px 16px 14px; }
.kc-top { display: flex; gap: 8px; align-items: flex-start; }
.kc-txt { flex: 1 1 auto; min-width: 0; }
.kc-kick {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2;
  padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .6); color: var(--kc-ink);
}
.kc-greet {
  margin: 10px 0 4px; font-size: 21px; line-height: 1.15; font-weight: 850; letter-spacing: -.02em;
  color: var(--kc-ink); overflow-wrap: anywhere;
}
.kc-line { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--kc-sub); overflow-wrap: anywhere; }
.kc-art { flex: none; width: 112px; margin: -6px -8px -4px 0; }
.kc-art svg { display: block; width: 100%; height: auto; }
.kc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kc-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 100%;
  font-size: 12.5px; font-weight: 700; line-height: 1.35; padding: 7px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .72); color: var(--kc-ink); overflow-wrap: anywhere;
}
.kc-chip b { color: var(--kc-acc); font-weight: 800; }
.kc-chip small { font-weight: 600; opacity: .75; }
.kc-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .62);
  font-size: 13.5px; line-height: 1.5; color: var(--kc-ink); overflow-wrap: anywhere;
  -webkit-user-select: text; user-select: text;
}
.kc-note small { display: block; margin-top: 3px; font-size: 12px; opacity: .75; }
.kc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kc-btn {
  font: inherit; font-size: 14px; font-weight: 750; line-height: 1.2; border-radius: 12px; padding: 10px 14px;
  border: 1px solid transparent; cursor: pointer; min-height: 42px; flex: 0 1 auto;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.kc-btn:active { transform: translateY(1px); }
.kc-btn:focus-visible { outline: 3px solid rgba(59, 99, 232, .55); outline-offset: 2px; }
.kc-pri { background: #fff; color: #14205a; }
.kc-gh { background: transparent; color: var(--kc-ink); border-color: rgba(0, 0, 0, .18); }

/* dark festival backgrounds (Deepavali, Christmas, Eid) */
.kc-card.is-dark .kc-kick, .kc-card.is-dark .kc-chip { background: rgba(255, 255, 255, .13); }
.kc-card.is-dark .kc-note { background: rgba(255, 255, 255, .1); }
.kc-card.is-dark .kc-gh { color: #fff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .1); }

/* the themes */
.kc-t-deepavali { background: linear-gradient(150deg, #2b0f45 0%, #4a1460 55%, #7a1f3d 100%); --kc-ink: #fff6e0; --kc-sub: #f3d9b1; --kc-acc: #ffc94d; }
.kc-t-dussehra { background: linear-gradient(150deg, #fff4e0 0%, #ffe2bd 60%, #ffd2a6 100%); --kc-ink: #5c1a00; --kc-sub: #8a3b12; --kc-acc: #c2410c; }
.kc-t-sankranti { background: linear-gradient(160deg, #e3f4ff 0%, #cfeaff 55%, #fff1c2 100%); --kc-ink: #0b3b5c; --kc-sub: #2c5d80; --kc-acc: #b45309; }
.kc-t-ugadi { background: linear-gradient(155deg, #f4fbe8 0%, #e3f5c8 55%, #fff3bf 100%); --kc-ink: #24420e; --kc-sub: #4a6b25; --kc-acc: #2b8a3e; }
.kc-t-ganesha { background: linear-gradient(155deg, #fff0e6 0%, #ffd8c2 55%, #ffe8a3 100%); --kc-ink: #5a1d0b; --kc-sub: #8c3a1c; --kc-acc: #c2410c; }
.kc-t-christmas { background: linear-gradient(155deg, #0f3d2e 0%, #145c40 60%, #7a1d1d 100%); --kc-ink: #f2fff8; --kc-sub: #c7eadb; --kc-acc: #ffd43b; }
.kc-t-eid { background: linear-gradient(155deg, #063b3b 0%, #0b5f5a 60%, #134e6f 100%); --kc-ink: #eafff9; --kc-sub: #bfe9df; --kc-acc: #ffd43b; }
.kc-t-holi { background: linear-gradient(150deg, #fff0f6 0%, #f3f0ff 50%, #e6fcf5 100%); --kc-ink: #3b1450; --kc-sub: #5f3c75; --kc-acc: #c2255c; }
.kc-t-holiday { background: linear-gradient(155deg, #eef2ff 0%, #e3e9ff 60%, #e6fbf5 100%); --kc-ink: #14205a; --kc-sub: #46518a; --kc-acc: #2b4fc7; }

/* The art ALWAYS sits beside the text (owner 2026-11-08: the stacked layout left a
   gap under the art in the tenant Android app). Narrow cards just shrink it. */
.kc-top { flex-direction: row !important; }
.kc-art { align-self: flex-start; }
@media (max-width: 380px) { .kc-art { width: 92px; } .kc-greet { font-size: 19px; } }
@container kc (max-width: 339px) {
  .kc-art { width: 84px; margin: -4px -6px 0 0; }
  .kc-greet { font-size: 18px; }
  .kc-btn { flex: 1 1 100%; }
}
/* roomy cards (tablets, laptops) */
@container kc (min-width: 520px) {
  .kc-in { padding: 22px 24px 20px; }
  .kc-greet { font-size: 27px; margin-top: 12px; }
  .kc-line { font-size: 15px; }
  .kc-art { width: 168px; margin: -10px -6px -8px 0; }
  .kc-chip { font-size: 13.5px; }
  .kc-note { font-size: 14.5px; }
}
@container kc (min-width: 820px) {
  .kc-art { width: 200px; }
  .kc-greet { font-size: 30px; }
}
/* upcoming: a calmer, smaller card */
.kc-card.is-upcoming .kc-greet { font-size: 18px; }
.kc-card.is-upcoming .kc-art { width: 92px; }
@container kc (min-width: 520px) {
  .kc-card.is-upcoming .kc-greet { font-size: 21px; }
  .kc-card.is-upcoming .kc-art { width: 128px; }
}

@media (prefers-reduced-motion: no-preference) {
  .kc-card { animation: kcIn .45s cubic-bezier(.2, .9, .25, 1) both; }
  @keyframes kcIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ------------------------- Manager: open button -------------------------- */
.kc-open-row { margin: 0 0 16px; }
.kc-open-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-size: 15px; font-weight: 750; line-height: 1.25; text-align: center;
  padding: 12px 16px; min-height: 48px; border-radius: 14px; cursor: pointer;
  color: var(--brand-800, #1b2e78); background: var(--card, #fff);
  border: 1.5px dashed var(--brand-500, #3b63e8);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.kc-open-btn:hover { background: var(--brand-50, #f2f6ff); }
.kc-open-btn:focus-visible { outline: 3px solid rgba(59, 99, 232, .45); outline-offset: 2px; }
@media (min-width: 900px) { .kc-open-btn { width: auto; display: inline-flex; } }

/* ---------------------------- Manager: the form --------------------------- */
.kc-form { container-type: inline-size; container-name: kcf; }
.kc-form .kc-lbl { display: block; font-size: 13px; font-weight: 750; margin: 14px 0 8px; color: var(--ink, #0f172a); }
.kc-form .kc-lbl:first-child { margin-top: 0; }
.kc-fests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@container kcf (max-width: 270px) { .kc-fests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container kcf (min-width: 560px) { .kc-fests { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kc-fest {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; min-width: 0;
  padding: 10px 4px 8px; border-radius: 14px; border: 1.5px solid var(--line, #e4e8f2); background: var(--bg, #f5f7fc);
  font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--ink, #0f172a);
  cursor: pointer; overflow-wrap: anywhere;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.kc-fest .e { font-size: 22px; line-height: 1; }
.kc-fest[aria-pressed="true"] { border-color: var(--brand-500, #3b63e8); background: var(--brand-50, #eef2ff); box-shadow: 0 0 0 3px rgba(59, 99, 232, .18); }
:root[data-theme="dark"] .kc-fest[aria-pressed="true"] { background: var(--brand-100, #26325c); }
.kc-fest:focus-visible { outline: 3px solid rgba(59, 99, 232, .45); outline-offset: 2px; }
.kc-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@container kcf (max-width: 300px) { .kc-dates { grid-template-columns: minmax(0, 1fr); } }
.kc-dates .input { width: 100%; min-width: 0; box-sizing: border-box; }
.kc-form textarea.input { width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical; }
.kc-ist { margin-top: 6px; font-size: 12px; color: var(--muted, #6b7690); }
.kc-count { float: right; font-weight: 600; color: var(--muted, #6b7690); }
.kc-sum {
  margin-top: 14px; padding: 12px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5;
  background: #ecfdf5; border: 1px solid #b7ebd3; color: #065f46; overflow-wrap: anywhere;
}
:root[data-theme="dark"] .kc-sum { background: #0f3b31; border-color: #1c6b56; color: #c7f5e4; }
.kc-sum.is-bad { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
:root[data-theme="dark"] .kc-sum.is-bad { background: #3b1414; border-color: #7f1d1d; color: #fecaca; }

/* staff meal cards while closed */
.fs-meals.is-closed .fs-meal, .fs-meals.is-closed > * { opacity: .5; filter: grayscale(.35); }
.fs-closed-note { margin: 0 0 12px; font-size: 13.5px; color: var(--muted, #6b7690); }
