/* ============================================================================
   REALCAJUNRECIPES.COM - AD SYSTEM STYLES
   ============================================================================
   Elegant, native-feeling ad placements that respect the site's warm,
   1970s cookbook aesthetic. These styles make ads feel like part of the
   content rather than intrusive interruptions.

   Philosophy:
   - Native content (cookbooks, parishes) should look like site content
   - Google ads should be subtly contained but not jarring
   - Everything uses the existing color palette and typography
   ============================================================================ */

/* ============================================================================
   AD SLOT BASE STYLES
   ============================================================================ */

.ad-slot {
  margin: var(--space-8) 0;
  padding: var(--space-4);
  background: var(--cream-dark);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.ad-slot::before {
  content: attr(aria-label);
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  opacity: 0.6;
}

.ad-slot--sidebar {
  margin: var(--space-4) 0;
}

.ad-slot--in_article {
  margin: var(--space-6) auto;
  max-width: 728px;
}

.ad-slot--in_feed {
  margin: var(--space-4) 0;
}

/* ============================================================================
   COOKBOOK PROMO STYLES
   ============================================================================ */

.cookbook-promo {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookbook-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cookbook-promo__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Default variant - full card */
.cookbook-promo--default {
  padding: var(--space-4);
}

.cookbook-promo--default .cookbook-promo__link {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.cookbook-promo--default .cookbook-promo__cover {
  position: relative;
  flex-shrink: 0;
}

.cookbook-promo--default .cookbook-promo__image {
  width: 120px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookbook-promo--default .cookbook-promo__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookbook-promo--default .cookbook-promo__content {
  flex: 1;
  min-width: 0;
}

.cookbook-promo--default .cookbook-promo__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
  line-height: 1.3;
}

.cookbook-promo--default .cookbook-promo__description {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
  line-height: 1.5;
}

.cookbook-promo--default .cookbook-promo__cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-link);
  padding: 8px 16px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease;
}

.cookbook-promo:hover .cookbook-promo__cta {
  background: var(--color-primary);
  color: white;
}

/* Compact variant - for sidebars */
.cookbook-promo--compact {
  padding: var(--space-3);
}

.cookbook-promo--compact .cookbook-promo__link {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.cookbook-promo--compact .cookbook-promo__image {
  width: 80px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cookbook-promo--compact .cookbook-promo__content {
  flex: 1;
  min-width: 0;
}

.cookbook-promo--compact .cookbook-promo__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cookbook-promo--compact .cookbook-promo__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
  line-height: 1.3;
}

.cookbook-promo--compact .cookbook-promo__cta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-link);
}

/* Inline variant - for between content */
.cookbook-promo--inline {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  border-left: 4px solid var(--color-primary);
}

.cookbook-promo--inline .cookbook-promo__container {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.cookbook-promo--inline .cookbook-promo__image {
  width: 60px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cookbook-promo--inline .cookbook-promo__content {
  flex: 1;
}

.cookbook-promo--inline .cookbook-promo__pitch {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.cookbook-promo--inline .cookbook-promo__offer {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2);
}

.cookbook-promo--inline .cookbook-promo__button {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: var(--color-primary);
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cookbook-promo--inline .cookbook-promo__button:hover {
  background: var(--text-primary);
}

/* Minimal variant */
.cookbook-promo--minimal {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.cookbook-promo--minimal .cookbook-promo__image {
  width: 100px;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.cookbook-promo--minimal:hover .cookbook-promo__image {
  transform: scale(1.05);
}

/* ============================================================================
   PARISH WIDGET STYLES
   ============================================================================ */

.parish-widget {
  background: linear-gradient(135deg, var(--cream) 0%, var(--linen) 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.parish-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.parish-widget__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Default variant */
.parish-widget--default {
  padding: var(--space-4);
}

.parish-widget--default .parish-widget__link {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.parish-widget--default .parish-widget__map {
  flex-shrink: 0;
}

.parish-widget--default .parish-widget__image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.parish-widget--default .parish-widget__content {
  flex: 1;
  min-width: 0;
}

.parish-widget--default .parish-widget__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.parish-widget--default .parish-widget__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.parish-widget--default .parish-widget__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2);
}

.parish-widget--default .parish-widget__cta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-link);
}

/* Compact variant */
.parish-widget--compact {
  padding: var(--space-3);
}

.parish-widget--compact .parish-widget__link {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.parish-widget--compact .parish-widget__image {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.parish-widget--compact .parish-widget__content {
  flex: 1;
  min-width: 0;
}

.parish-widget--compact .parish-widget__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.parish-widget--compact .parish-widget__cta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-link);
}

/* Inline variant */
.parish-widget--inline {
  background: var(--cream-dark);
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
}

.parish-widget--inline .parish-widget__link {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.parish-widget--inline .parish-widget__image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.parish-widget--inline .parish-widget__text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.parish-widget--inline .parish-widget__text strong {
  color: var(--text-primary);
}

/* ============================================================================
   RECIPE SIDEBAR STYLES
   ============================================================================ */

.recipe-sidebar {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.recipe-sidebar__section {
  margin-bottom: var(--space-6);
}

.recipe-sidebar__section:last-child {
  margin-bottom: 0;
}

/* Author section */
.recipe-sidebar__author {
  text-align: center;
}

.recipe-sidebar__heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.recipe-sidebar__location {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

.recipe-sidebar__location i {
  color: var(--color-link);
  margin-right: 6px;
}

/* Parish in sidebar */
.recipe-sidebar__parish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--cream-dark);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--space-4);
  transition: background 0.2s ease;
}

.recipe-sidebar__parish:hover {
  background: var(--linen);
}

.recipe-sidebar__parish-map {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.recipe-sidebar__parish-info {
  text-align: center;
}

.recipe-sidebar__parish-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.recipe-sidebar__parish-tagline {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.recipe-sidebar__author-link {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.recipe-sidebar__author-link:hover {
  color: var(--text-primary);
}

/* Cookbook section in sidebar */
.recipe-sidebar__cookbook {
  /* Uses cookbook-promo styles */
}

/* Ad section in sidebar */
.recipe-sidebar__ad .ad-slot {
  margin: 0;
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
  .cookbook-promo--default .cookbook-promo__link {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cookbook-promo--default .cookbook-promo__image {
    width: 100px;
  }

  .cookbook-promo--inline .cookbook-promo__container {
    flex-direction: column;
    text-align: center;
  }

  .parish-widget--default .parish-widget__link {
    flex-direction: column;
    text-align: center;
  }

  .recipe-sidebar__parish-map {
    width: 80px;
    height: 80px;
  }
}

/* ============================================================================
   DARK MODE ADJUSTMENTS
   ============================================================================ */

[data-theme="dark"] .ad-slot,
[data-theme="dark"] .cookbook-promo,
[data-theme="dark"] .parish-widget {
  background: var(--surface-elevated);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .cookbook-promo__title,
[data-theme="dark"] .parish-widget__title,
[data-theme="dark"] .recipe-sidebar__heading,
[data-theme="dark"] .recipe-sidebar__parish-name {
  color: var(--text-primary);
}

[data-theme="dark"] .cookbook-promo--default .cookbook-promo__cta {
  background: var(--surface);
  color: var(--color-link);
}

[data-theme="dark"] .recipe-sidebar__parish {
  background: var(--surface);
}

[data-theme="dark"] .recipe-sidebar__parish:hover {
  background: var(--surface-elevated);
}

/* ============================================================================
   IN-ARTICLE ADS (Recipe Pages)
   ============================================================================ */

.recipe-ad {
  margin: var(--space-6) 0;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.recipe-ad--after-ingredients {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.recipe-ad--after-method {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.recipe-ad .ad-slot {
  margin: 0;
  background: transparent;
  border: none;
  padding: var(--space-2) 0;
}

/* ============================================================================
   IN-FEED ADS (Listing Pages)
   ============================================================================ */

.recipe-list-ad {
  padding: var(--space-4) var(--space-3);
  margin: var(--space-2) 0;
  background: var(--cream-dark);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.recipe-list-ad .ad-slot {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* ============================================================================
   LISTING PAGE PROMO SECTION
   ============================================================================ */

.recipes-index-promo {
  margin-bottom: var(--space-6);
}

/* ============================================================================
   PRINT STYLES - Hide ads in print
   ============================================================================ */

@media print {
  .ad-slot,
  .cookbook-promo,
  .parish-widget,
  .recipe-sidebar__cookbook,
  .recipe-sidebar__ad,
  .recipe-ad,
  .recipe-list-ad,
  .recipes-index-promo {
    display: none !important;
  }
}
