/* =========================================================
   GLOBAL VARIABLES
   ========================================================= */
:root {
  --logo-size-sm: 48px;
  --logo-size-md: 64px;
  --logo-size-lg: 180px;

  /* Active logo size */
  --logo-size: var(--logo-size-lg);
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.5;
}

/* =========================================================
   GLOBAL LAYOUT
   ========================================================= */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* =========================================================
   LOGO
   ========================================================= */
.logo {
  height: var(--logo-size);
  width: auto;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: white;
  border-bottom: 1px solid #ddd;
}

.header-left .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 6px 10px;
}

.header-nav a:hover {
  color: #1e73ff;
}

/* =========================================================
   DROPDOWN MENU
   ========================================================= */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
}

.dropdown-toggle:hover {
  color: #1e73ff;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 32px;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 160px;
  z-index: 20;
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  text-decoration: none;
  color: #333;
}

.dropdown-menu a:hover {
  background: #eef4ff;
}

/* =========================================================
   AUTH NAV
   ========================================================= */
.auth-nav .auth-btn {
  background: #1e73ff;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.auth-nav .auth-btn:hover {
  background: #1559cc;
}

/* =========================================================
   USERNAME BANNER
   ========================================================= */
.user-banner {
  background: #eef4ff;
  padding: 12px 28px;
  font-size: 1rem;
  border-bottom: 1px solid #d0dcff;
  font-weight: 500;
}

/* =========================================================
   GLOBAL BUTTONS
   ========================================================= */
.btn,
button,
input[type="submit"],
input[type="button"],
.auth-btn,
.file-input-button {
  background: #1e73ff;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.auth-btn:hover,
.file-input-button:hover {
  background: #1559cc;
}

/* Center submit buttons */
button[type="submit"],
.btn-primary {
  display: block;
  margin: 20px auto 0 auto;
}

/* =========================================================
   GLOBAL CARD SYSTEM
   ========================================================= */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

/* =========================================================
   GLOBAL GRID SYSTEM
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  padding: 20px 0;
}

/* =========================================================
   GLOBAL FORM BASELINE
   ========================================================= */
input[type="text"],
input[type="url"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  text-align: center;
  padding: 30px;
  margin-top: 50px;
  color: #666;
  font-size: 0.9rem;
}

.dropdown-toggle {
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  color: #333;
}

.dropdown-toggle:hover {
  color: #1e73ff;
}

.user-banner {
  background: #eef4ff;
  padding: 12px 28px;
  font-size: 1rem;
  border-bottom: 1px solid #d0dcff;
  font-weight: 500;
  text-align: right;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%; /* THIS is the missing piece */
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%; /* ensures username can reach the right edge */
}

.header-username {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}
/* Thumbnail preview for parsed recipe image */
.parse-preview-image {
    width: 180px;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
    display: block;
    margin: 10px 0;
}

/* Polished thumbnail frame */
.parse-image-frame {
    width: 200px;               /* consistent thumbnail width */
    padding: 8px;               /* inner padding for the frame */
    background: #fff;           /* clean white frame */
    border: 1px solid #e5e7eb;  /* soft gray border */
    border-radius: 10px;        /* smooth rounded corners */
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); /* subtle shadow */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
}

/* Thumbnail image inside the frame */
.parse-preview-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.blog-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--surface);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
}

.recipe-card-image {
    width: 100%;
    height: 220px; /* adjust to taste */
    overflow: hidden;
    border-radius: 8px 8px 0 0; /* matches your card rounding */
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recipe-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.subheader-bar {
    position: relative;
    display: flex;
    justify-content: center; /* 👈 keeps text centered */
    align-items: center;
}

.subheader-text {
    text-align: center;
    width: 100%;
}

.subheader-user-wrap {
    position: absolute;
    right: 20px; /* adjust spacing */
    display: flex;
    align-items: center;
    gap: 10px;
}

.subheader-user {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #003366;
  font-weight: 600;
}

.logo-script {
  font-family: "Brush Script MT", "Dancing Script", cursive;
  font-size: 1.6rem;      /* slightly smaller than the subheader text */
  color: #000000;         /* pure black */
  margin-top: -4px;       /* pulls it closer to the logo */
  text-align: center;
  user-select: none;
}

.ingredient-item .ingredient-text,
.instruction-item .instruction-text {
    white-space: pre-wrap !important;
    display: inline-block;
}


.pricing-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 40px auto;
}

.pricing-card {
  padding: 25px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}

.pricing-compare {
  max-width: 900px;
  margin: 0 auto 50px auto;
  padding: 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Compare Plans block */
.pricing-compare {
  max-width: 900px;
  margin: 60px auto;
  padding: 25px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}

/* Centered heading */
.compare-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* Centered table */
.compare-table {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  text-align: center;
}

.compare-table th,
.compare-table td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: center;
  font-size: 1rem;
}

body[data-page="pricing"] .subheader-bar {
    display: none !important;
}

body[data-page="pricing"] main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove extra spacing under nav on pricing page */
body[data-page="pricing"] .site-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body[data-page="pricing"] .subheader-bar {
    margin-top: 0 !important;
}

/* MOBILE NAV BAR */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #ffffff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 3000;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Hide on desktop */
@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav-item {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #444;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-nav-item img {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  opacity: 0.85;
}

.mobile-nav-item:hover img {
  opacity: 1;
}

/* Center floating add button */
.mobile-nav-add {
  background: #2ecc71;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-top: -32px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mobile-nav-add img {
  width: 28px;
  height: 28px;
  margin: 0;
  filter: brightness(0) invert(1);
}

/* Hide desktop header on mobile */
@media (max-width: 767px) {
  .site-header,
  .header-nav,
  .subheader-bar {
    display: none;
  }
}


@media (max-width: 767px) {
  .header-nav,
  .subheader-bar {
    display: none;
  }

  .site-header {
    padding: 0.5rem 1rem;
  }

  .site-header .logo {
    width: 120px;
  }
}

/* FORCE Google-style search bar layout */
.recipes-search-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.google-search-form {
  width: 100%;
  max-width: 800px;   /* THIS is what makes it big */
}

.google-search-inner {
  width: 100%;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 40px;
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  font-size: 1.2rem;
  margin: 0 auto;     /* center it */
}

.google-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.2rem;
}

.google-search-button {
  margin-top: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 24px;
  border: 1px solid #dcdcdc;
  background: #f8f8f8;
  cursor: pointer;
  font-size: 1rem;
}

/* FORCE Google-style search bar layout */
.full-width {
  width: 100%;
}

.recipes-search-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.google-search-form {
  width: 100%;
  max-width: 800px; /* Google size */
}

.google-search-inner {
  width: 100%;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 40px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 1.2rem;
  margin: 0 auto;
}

.google-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.2rem;
}

.google-search-button {
  margin-top: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 24px;
  border: 1px solid #dcdcdc;
  background: #f8f8f8;
  cursor: pointer;
  font-size: 1rem;
}

/* ================================
   SUBHEADER USERNAME LINK
   ================================ */

.subheader-user {
    margin-left: auto;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.subheader-user:hover {
    background: #f0f0f0;
    color: #000;
}
