/**
 * EZ Monthly Horoscope Block Styles
 */

/* Base Block Styles */
.ez-monthly-horoscope-block {
  padding: 1rem;
  border-radius: var(--wp--preset--radius--small, 8px);
}

/* Article Container */
.ez-monthly-horoscope {
  max-width: 100%;
  font-family: inherit;
  line-height: 1.6;
}

/* Header Section */
.ez-monthly-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 1rem;
  position: relative;
}

.ez-monthly-header.has-background {
  padding: 3rem 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.ez-monthly-header .ez-hero-overlay {
  border-radius: 8px;
}

.ez-monthly-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

.ez-monthly-subtitle {
  font-size: 1.1rem;
  color: var(--wp--preset--color--secondary, #666);
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

/* Inline Image */
.ez-monthly-inline-image {
  position: relative;
  display: block;
  max-width: 100%;
}

.ez-monthly-inline-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.ez-monthly-inline-image .ez-hero-overlay {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
}

/* Ensure theme content allows centered images */
.ez-monthly-theme-content {
  width: 100%;
}

/* Section Titles */
.ez-monthly-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--wp--preset--color--primary, #6b5ce7);
}

.ez-monthly-subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
}

/* Theme Section */
.ez-monthly-theme {
  margin-bottom: 2rem;
  overflow: hidden; /* Contains floated hero image within this section */
}

.ez-monthly-theme::after {
  content: "";
  display: table;
  clear: both;
}

.ez-monthly-theme-content p {
  margin-bottom: 1rem;
}

.ez-monthly-theme-content p:last-child {
  margin-bottom: 0;
}

/* Key Dates Section */
.ez-monthly-key-dates {
  clear: both; /* Prevent hero image float from bleeding into this section */
  margin-bottom: 2rem;
  background: var(--wp--preset--color--base-2, #f8f9fa);
  padding: 1.5rem;
  border-radius: 8px;
}

.ez-monthly-dates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ez-monthly-date-item {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-bottom: 1px solid var(--wp--preset--color--contrast-3, #dee2e6);
}

.ez-monthly-date-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ez-monthly-date-item:first-child {
  padding-top: 0;
}

.ez-monthly-date {
  font-weight: 700;
  color: var(--wp--preset--color--primary, #6b5ce7);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.ez-monthly-date-description {
  color: var(--wp--preset--color--foreground, #333);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Focus Areas Section */
.ez-monthly-focus-areas {
  margin-bottom: 2rem;
}

.ez-monthly-focus {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border-radius: 8px;
  background: var(--wp--preset--color--base-2, #f8f9fa);
}

.ez-monthly-focus:last-child {
  margin-bottom: 0;
}

.ez-monthly-focus-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ez-monthly-focus-content p {
  margin-bottom: 0.75rem;
}

.ez-monthly-focus-content p:last-child {
  margin-bottom: 0;
}

/* Focus Area Variants */
.ez-monthly-focus-love {
  border-left: 4px solid #e91e63;
}

.ez-monthly-focus-career {
  border-left: 4px solid #2196f3;
}

.ez-monthly-focus-health {
  border-left: 4px solid #4caf50;
}

.ez-monthly-focus-spiritual {
  border-left: 4px solid #9c27b0;
}

/* Practices Section */
.ez-monthly-practices {
  margin-bottom: 2rem;
}

.ez-monthly-rituals,
.ez-monthly-journaling,
.ez-monthly-intentions {
  margin-bottom: 1.5rem;
}

.ez-monthly-rituals-list,
.ez-monthly-journaling-list,
.ez-monthly-intentions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ez-monthly-ritual-item,
.ez-monthly-journaling-item,
.ez-monthly-intention-item {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin-bottom: 0.5rem;
}

.ez-monthly-ritual-item::before,
.ez-monthly-journaling-item::before,
.ez-monthly-intention-item::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--wp--preset--color--primary, #6b5ce7);
  font-weight: bold;
}

.ez-monthly-journaling-item::before {
  content: "?";
}

.ez-monthly-intention-item::before {
  content: "✓";
}

/* Mantra Section */
.ez-monthly-mantra {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--wp--preset--color--primary, #6b5ce7) 0%, #8b7cf7 100%);
  border-radius: 12px;
  color: #fff;
}

.ez-monthly-mantra .ez-monthly-section-title {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

.ez-monthly-mantra-text {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 500;
  margin: 1.5rem 0;
  padding: 0 1rem;
  line-height: 1.4;
}

.ez-monthly-closing {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

/* CTA Styles */
.ez-monthly-cta {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--wp--preset--color--base-2, #f8f9fa);
  border-radius: 8px;
  border: 1px solid var(--wp--preset--color--contrast-3, #dee2e6);
}

.ez-monthly-cta-left {
  text-align: left;
}

.ez-monthly-cta-center {
  text-align: center;
}

.ez-monthly-cta-right {
  text-align: right;
}

.ez-monthly-cta-header {
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

.ez-monthly-cta-text {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--wp--preset--color--foreground, #333);
}

.ez-monthly-cta-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem auto;
  border-radius: 8px;
}

.ez-monthly-cta-left .ez-monthly-cta-image {
  margin-left: 0;
  margin-right: auto;
}

.ez-monthly-cta-right .ez-monthly-cta-image {
  margin-left: auto;
  margin-right: 0;
}

.ez-monthly-cta-image-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.ez-monthly-cta-image-link img {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ez-monthly-cta-image-link:hover img {
  opacity: 0.9;
  transform: scale(1.02);
}

.ez-monthly-cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  background-color: var(--wp--preset--color--primary, #6b5ce7);
  color: #fff !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ez-monthly-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #fff !important;
}

.ez-monthly-cta-link {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: underline;
  color: var(--wp--preset--color--primary, #6b5ce7);
}

.ez-monthly-cta-link:hover {
  text-decoration: none;
}

/* Error State */
.ez-horoscope-block-error {
  padding: 1.5rem;
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  text-align: center;
}

/* Hero Overlay */
.ez-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.ez-hero-overlay.light {
  background-color: rgba(255, 255, 255, 0.7);
}

.ez-hero-overlay.dark {
  background-color: rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (min-width: 768px) {
  .ez-monthly-date-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }

  .ez-monthly-date {
    min-width: 120px;
    flex-shrink: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .ez-monthly-header {
    padding: 1rem 0.5rem;
  }

  .ez-monthly-key-dates,
  .ez-monthly-focus,
  .ez-monthly-cta {
    padding: 1rem;
  }

  .ez-monthly-mantra {
    padding: 1.5rem 1rem;
  }

  .ez-monthly-mantra-text {
    font-size: 1.25rem;
  }

  .ez-monthly-section-title {
    font-size: 1.25rem;
  }

  .ez-monthly-focus-title {
    font-size: 1.1rem;
  }
}

/* RTL Support */
[dir="rtl"] .ez-monthly-ritual-item,
[dir="rtl"] .ez-monthly-journaling-item,
[dir="rtl"] .ez-monthly-intention-item {
  padding-left: 0;
  padding-right: 1.5rem;
}

[dir="rtl"] .ez-monthly-ritual-item::before,
[dir="rtl"] .ez-monthly-journaling-item::before,
[dir="rtl"] .ez-monthly-intention-item::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .ez-monthly-focus-love,
[dir="rtl"] .ez-monthly-focus-career,
[dir="rtl"] .ez-monthly-focus-health,
[dir="rtl"] .ez-monthly-focus-spiritual {
  border-left: none;
  border-right-width: 4px;
  border-right-style: solid;
}

[dir="rtl"] .ez-monthly-focus-love {
  border-right-color: #e91e63;
}

[dir="rtl"] .ez-monthly-focus-career {
  border-right-color: #2196f3;
}

[dir="rtl"] .ez-monthly-focus-health {
  border-right-color: #4caf50;
}

[dir="rtl"] .ez-monthly-focus-spiritual {
  border-right-color: #9c27b0;
}

/* Print Styles */
@media print {
  .ez-monthly-horoscope-block {
    padding: 0;
  }

  .ez-monthly-cta {
    display: none;
  }

  .ez-monthly-mantra {
    background: #f0f0f0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .ez-monthly-mantra .ez-monthly-section-title {
    color: #000 !important;
  }
}