/* General reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Utility */
.hidden {
  display: none !important;
}

/* =============== */
/* PASSCODE PAGE   */
/* =============== */

.pass-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at top, #38bdf8 0, #0f172a 55%, #020617 100%);
}

.pass-card {
  background: #f9fafb;
  padding: 2rem 2.2rem;
  border-radius: 1.25rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  border: 2px solid #0ea5e9;
}

.pass-card h1 {
  font-size: 1.7rem;
  margin-bottom: 0.3rem;
  color: #020617;
}

.pass-subtitle {
  margin-bottom: 1rem;
  color: #4b5563;
  font-size: 0.95rem;
}

#passcodeInput {
  width: 100%;
  padding: 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
  background: #ffffff;
}

#enterSiteBtn {
  width: 100%;
  padding: 0.8rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: #0ea5e9;
  color: #020617;
  margin-bottom: 0.35rem;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.35);
}

#enterSiteBtn:hover {
  background: #38bdf8;
}

.lock-error {
  min-height: 1.1em;
  font-size: 0.85rem;
  color: #b91c1c;
}

/* Remember me row under password */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #4b5563;
  margin-top: 0.35rem;
}

.remember-row input {
  margin: 0;
}

.pass-hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Which page is visible */
body.locked #app {
  display: none;
}

body.locked #passPage {
  display: flex;
}

body.unlocked #passPage {
  display: none;
}

body.unlocked #app {
  display: block;
}

/* ===================== */
/* MAIN APP (PENGUIN)    */
/* ===================== */

.app {
  background: #e0f2fe;
  min-height: 100vh;
}

.header {
  background: #020617;
  color: white;
  padding: 1.2rem 1rem 0.6rem;
  border-bottom: 4px solid #0ea5e9;
  text-align: center;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}

.header-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.penguin-left,
.penguin-right {
  font-size: 2rem;
}

.header-subtitle {
  margin: 0.35rem 0 0.6rem;
  color: #bfdbfe;
  font-size: 0.95rem;
}

.container {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0 1rem 2rem;
}

/* Search section */

.search-section {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.9rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
  margin-bottom: 1.5rem;
  border: 1px solid #dbeafe;
}

.label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

#locationInput {
  width: 100%;
  padding: 0.8rem;
  border-radius: 0.7rem;
  border: 1px solid #cbd5f5;
  margin-bottom: 0.7rem;
  font-size: 1rem;
  background: #ffffff;
}

#locationInput:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #1f2937;
}

/* Row for search + show all buttons */
.search-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

#searchBtn {
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  background: #0ea5e9;
  color: #020617;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(56, 189, 248, 0.5);
  min-height: 44px;
}

#searchBtn:hover {
  background: #38bdf8;
}

/* Secondary button (Show all) */
.secondary-btn {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #ffffff;
  color: #0f172a;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
}

.secondary-btn:hover {
  background: #eff6ff;
}

/* Results */

.results-section {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.9rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
  border: 1px solid #dbeafe;
  margin-bottom: 1.5rem;
}

.results-section h2 {
  margin-bottom: 0.3rem;
}

.results-count {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 0.7rem;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Result cards */

.place-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.8rem 0.9rem;
  background: #ffffff;
}

.place-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.place-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.place-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-certified {
  background: #dcfce7;
  color: #166534;
}

.badge-muslim-owned {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-vegetarian {
  background: #fef9c3;
  color: #854d0e;
}

.place-location,
.place-cuisine,
.place-notes {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.place-location {
  color: #4b5563;
}

.place-cuisine {
  font-style: italic;
  color: #1e293b;
}

.place-notes {
  margin-top: 0.4rem;
  color: #334155;
}

/* Rating stars */

.place-rating {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rating-stars {
  display: inline-flex;
  gap: 0.1rem;
}

.rating-star {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  color: #cbd5f5;
}

.rating-star.filled {
  color: #facc15;
}

.rating-label {
  font-size: 0.8rem;
  color: #4b5563;
}

/* Place actions */

.place-actions {
  margin-top: 0.5rem;
  text-align: right;
}

.remove-place-btn {
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  cursor: pointer;
}

.remove-place-btn:hover {
  background: #fecaca;
}

/* Add place form */

.add-place-section {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.9rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.15);
  border: 1px solid #dbeafe;
}

.add-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

/* new tidy layout */
.add-header-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.add-subrow {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.add-penguin {
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.add-help {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 0;
}

.toggle-form-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: none;
  background: #0ea5e9;
  color: #020617;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.toggle-form-btn:hover {
  background: #38bdf8;
}

.form-row {
  margin-bottom: 0.8rem;
}

.form-row-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-col {
  flex: 1;
  min-width: 0;
}

.form-col-small {
  max-width: 90px;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #111827;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid #cbd5f5;
  font-size: 0.9rem;
  background: #ffffff;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}

.add-btn {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #020617;
  color: #f9fafb;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.2rem;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.5);
  min-height: 44px;
}

.add-btn:hover {
  background: #111827;
}

.add-message {
  min-height: 1.1em;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  color: #166534;
}

/* Footer */

.footer {
  text-align: center;
  padding: 1rem 0 1.3rem;
  font-size: 0.85rem;
  color: #0f172a;
}

/* =============== */
/* Mobile tweaks   */
/* =============== */

@media (max-width: 600px) {
  .header {
    padding: 1rem 0.8rem 0.5rem;
  }

  .header-title {
    font-size: 1.7rem;
  }

  .penguin-left,
  .penguin-right {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 0.8rem 1.8rem;
    max-width: 480px;
  }

  .place-card {
    padding: 0.75rem 0.8rem;
  }

  .rating-star {
    font-size: 1.25rem; /* easier to tap */
  }

  #searchBtn,
  .secondary-btn,
  .add-btn,
  .toggle-form-btn {
    width: 100%;
    text-align: center;
  }

  .search-buttons-row {
    flex-direction: column;
  }

  .search-buttons-row button {
    width: 100%;
  }
}

/* Extra polish for iPhone-ish widths */
@media (max-width: 480px) {
  .container {
    max-width: 430px;
  }

  .pass-card {
    padding-inline: 1.7rem;
  }

  .header-title {
    font-size: 1.6rem;
  }

  .search-section,
  .results-section,
  .add-place-section {
    padding: 0.85rem 0.85rem 1rem;
  }
}

/* ===================== */
/* HAMBURGER MENU STYLES */
/* ===================== */

.menu-button {
  position: fixed;
  top: 32px;              /* moved lower into the banner */
  left: 16px;
  font-size: 1.4rem;      /* still a nice size */
  font-weight: 700;
  color: #ffffff;         /* white icon on dark header */
  background: transparent;/* no blue background */
  padding: 0.25rem 0.45rem;/* keeps tap area, but subtle */
  border-radius: 8px;     /* optional, for touch hitbox */
  z-index: 9999;
  cursor: pointer;
  box-shadow: none;       /* no drop shadow */
}


/* Hide hamburger when menu open */
.menu-button.hidden {
  display: none;
}

.slide-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  background: #020617;
  color: white;
  padding: 1rem;
  padding-top: 3.2rem;
  border-right: 3px solid #0ea5e9;
  min-height: 100vh;
  z-index: 9998;
  transform: translateX(-250px);
  transition: transform 0.3s ease;
}

.slide-menu.open {
  transform: translateX(0);
}

.menu-title {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-list li {
  padding: 0.7rem 0;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 1px solid #1e293b;
}

.menu-list li:hover {
  color: #38bdf8;
}

/* Close X button inside menu */
.menu-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1.6rem;
  background: transparent;
  border: none;
  color: #e5e7eb;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.menu-close:hover {
  color: #38bdf8;
}
