/* ==========================================================================
   RamenYa - Standalone Stylesheet
   A warm, cream-themed ramen ordering app (System Under Test for Playwright).
   This file is self-contained -- it does NOT import the portfolio's style.css.
   ========================================================================== */

/* --- Variables --- */
:root {
  --ry-bg: #fdf6ec;
  --ry-text: #3e2c1a;
  --ry-text-light: #8a7560;
  --ry-accent: #d4440a;
  --ry-accent-hover: #b33808;
  --ry-card-bg: #fff8f0;
  --ry-border: #e8ddd0;
  --ry-radius: 10px;
  --ry-red: #d32f2f;
  --ry-green: #2e7d32;
}

/* --- Base / Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; padding: 0;
  background: var(--ry-bg);
  color: var(--ry-text);
  font-family: 'Outfit', sans-serif;
}

/* --- Training Banner (sticky top bar for learners) --- */
.training-banner {
  position: sticky; top: 0; z-index: 100;
  background: #1a1511; color: #ff6a00;
  text-align: left; padding: 8px 24px;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 2px;
  display: flex; justify-content: space-between; align-items: center;
}
.locator-toggle {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #ccc;
}
.locator-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; background: #444;
  border-radius: 11px; position: relative;
  cursor: pointer; transition: background 0.2s ease;
}
.locator-toggle input[type="checkbox"]:checked { background: #ff6a00; }
.locator-toggle input[type="checkbox"]::after {
  content: ''; width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  position: absolute; top: 2px; left: 2px;
  transition: left 0.2s ease;
}
.locator-toggle input[type="checkbox"]:checked::after { left: 20px; }

/* --- App Header --- */
.ry-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; border-bottom: 1px solid var(--ry-border);
}
.ry-logo { display: flex; align-items: center; gap: 12px; }
.ry-logo-icon { width: 40px; height: 40px; }
.ry-logo-name { font-size: 22px; font-weight: 700; color: var(--ry-text); }
.ry-logo-sub {
  font-size: 11px; color: var(--ry-text-light);
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* Search bar */
.ry-search { flex: 1; max-width: 500px; margin: 0 40px; position: relative; }
.ry-search input {
  width: 100%; padding: 12px 20px 12px 44px;
  border-radius: 24px; border: 1px solid var(--ry-border);
  background: var(--ry-card-bg); font-size: 14px;
  font-family: 'Outfit', sans-serif; outline: none;
  transition: border-color 0.2s ease;
}
.ry-search input:focus { border-color: var(--ry-accent); }
.ry-search-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%); color: var(--ry-text-light);
}

/* Nav actions */
.ry-nav-actions { display: flex; align-items: center; gap: 16px; }
.ry-login-btn {
  padding: 8px 20px; border-radius: 20px;
  border: 1px solid var(--ry-text); background: transparent;
  color: var(--ry-text); font-size: 14px; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: background 0.2s ease, color 0.2s ease;
}
.ry-cart-btn {
  position: relative; padding: 8px 16px; border-radius: 20px;
  border: 1px solid var(--ry-border); background: transparent;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif;
}
.ry-cart-count {
  background: var(--ry-red); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: -4px; right: -4px;
}

/* --- Main Content --- */
.ry-content { max-width: 1100px; margin: 0 auto; padding: 32px; }

/* --- Hero / Title --- */
.ry-title { font-size: 32px; font-weight: 700; color: var(--ry-text); margin-bottom: 8px; }
.ry-subtitle { font-size: 15px; color: var(--ry-text-light); margin-bottom: 32px; }

/* --- Filter Pills --- */
.ry-filters { display: flex; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.ry-filter {
  padding: 8px 20px; border-radius: 20px;
  border: 1px solid var(--ry-border); background: transparent;
  color: var(--ry-text); font-size: 14px; cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ry-filter:hover { border-color: var(--ry-accent); }
.ry-filter.active { background: var(--ry-accent); color: #fff; border-color: var(--ry-accent); }

/* --- Ramen Cards --- */
.ry-menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.ry-ramen-card {
  background: var(--ry-card-bg); border: 1px solid var(--ry-border);
  border-radius: var(--ry-radius); padding: 24px;
  transition: box-shadow 0.2s ease;
}
.ry-ramen-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }
.ry-ramen-header { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.ry-ramen-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.ry-ramen-icon.miso     { background: #8d6e3f; }
.ry-ramen-icon.tonkotsu { background: #6d4c2a; }
.ry-ramen-icon.shoyu    { background: #a0522d; }
.ry-ramen-icon.shio     { background: #c4a67a; }
.ry-ramen-name { font-size: 18px; font-weight: 700; }
.ry-ramen-category { font-size: 11px; color: var(--ry-text-light); text-transform: uppercase; letter-spacing: 1px; }
.ry-ramen-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 4px; text-transform: uppercase; margin-left: auto;
}
.ry-ramen-badge.signature { background: rgba(212, 68, 10, 0.1);  color: var(--ry-accent); }
.ry-ramen-badge.rich      { background: rgba(109, 76, 42, 0.15); color: #6d4c2a; }
.ry-ramen-badge.light     { background: rgba(196, 166, 122, 0.2); color: #8a7560; }
.ry-ramen-desc { font-size: 14px; color: var(--ry-text-light); line-height: 1.5; margin-bottom: 16px; }
.ry-ramen-footer { display: flex; justify-content: space-between; align-items: center; }
.ry-ramen-price { font-size: 20px; font-weight: 700; color: var(--ry-accent); }
.ry-add-btn {
  padding: 8px 20px; border-radius: 20px;
  background: var(--ry-accent); color: #fff; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'Outfit', sans-serif; transition: background 0.2s ease;
}
.ry-add-btn:hover { background: var(--ry-accent-hover); }

/* --- Login Modal --- */
.ry-login-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5); z-index: 200;
  justify-content: center; align-items: center;
}
.ry-login-overlay.open { display: flex; }
.ry-login-modal { background: #fff; border-radius: 12px; padding: 40px; width: 400px; max-width: 90vw; }
.ry-login-modal h2 { font-size: 24px; margin-bottom: 24px; color: var(--ry-text); }
.ry-login-field { margin-bottom: 16px; }
.ry-login-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ry-text); }
.ry-login-field input {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--ry-border); border-radius: 8px;
  font-size: 14px; font-family: 'Outfit', sans-serif;
}
.ry-login-submit {
  width: 100%; padding: 12px;
  background: var(--ry-accent); color: #fff; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: 'Outfit', sans-serif; margin-top: 8px;
}
.ry-login-error {
  display: none; background: rgba(211, 47, 47, 0.08);
  color: var(--ry-red); padding: 10px 14px;
  border-radius: 8px; font-size: 13px; margin-top: 12px;
}
.ry-login-error.visible { display: block; }

/* --- Cart Panel (slides in from right) --- */
.ry-cart-panel {
  display: none; position: fixed; right: 0; top: 0;
  height: 100vh; width: 380px; background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 150; padding: 24px; overflow-y: auto;
}
.ry-cart-panel.open { display: block; }
.ry-cart-panel h2 { font-size: 20px; margin-bottom: 20px; }
.ry-cart-item {
  display: flex; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--ry-border); font-size: 14px;
}
.ry-cart-empty { color: var(--ry-text-light); font-size: 14px; text-align: center; padding: 40px 0; }
.ry-cart-total { display: flex; justify-content: space-between; padding-top: 16px; font-size: 18px; font-weight: 700; }
.ry-cart-checkout {
  width: 100%; padding: 12px;
  background: var(--ry-accent); color: #fff; border: none;
  border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 16px; font-family: 'Outfit', sans-serif;
}
.ry-cart-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--ry-text-light);
}

/* --- Advanced Zone Teaser --- */
.ry-advanced-zone {
  margin-top: 48px; padding: 24px;
  border: 2px dashed var(--ry-border);
  border-radius: var(--ry-radius); opacity: 0.6;
}
.ry-advanced-zone strong { color: var(--ry-text); }
.ry-advanced-zone p { font-size: 14px; color: var(--ry-text-light); }

/* --- Locator Hints (visible when body.hints-on) --- */
body.hints-on [data-locator]::after {
  content: attr(data-locator);
  position: absolute; top: -24px; left: 0;
  font-size: 10px; background: #1a1511; color: #4fc3f7;
  padding: 2px 8px; border-radius: 4px;
  white-space: nowrap; z-index: 50; font-family: monospace;
}
body.hints-on [data-locator] {
  position: relative;
  outline: 2px dashed #4fc3f7; outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ry-header { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .ry-search { max-width: 100%; margin: 0; }
  .ry-content { padding: 20px 16px; }
  .ry-menu-grid { grid-template-columns: 1fr; }
  .ry-cart-panel { width: 100%; }
  .ry-login-modal { width: 100%; margin: 0 16px; }
}
