/* Modern responsive design with clean styling */
:root {
  --votd-overlay: rgba(0, 0, 0, 0.5);
  --votd-shadow-lg: rgba(0, 0, 0, 0.15);
}

/* Widget container with modern styling */
#verse-widget-header,
#verse-widget-sidebar {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 320px;
  max-width: 1200px;
  margin: 20px auto;
  transition: all 0.3s ease;
  position: relative;
}

/* Theme toggle button */
.votd-theme-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: var(--votd-overlay);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 20px;
}

.votd-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(180deg);
}

.votd-theme-toggle:focus {
  outline: 2px solid var(--votd-accent);
  outline-offset: 2px;
}

/* Background container with modern overlay */
.verse-background {
  flex-grow: 1;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--votd-shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.verse-background:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px var(--votd-shadow-lg);
}

/* Verse text now always white for optimal readability on nature backgrounds */
.verse-text {
  line-height: 1.7;
  font-weight: 500;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: white !important;
  /* Added default font-family that WordPress inline styles will override */
  font-family: "Roboto", sans-serif;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.01em;
  transition: all 0.3s ease;
}

/* Responsive font sizes */
@media screen and (max-width: 900px) {
  .verse-text {
    font-size: clamp(1rem, 4vw, 1.5rem);
    line-height: 1.6;
  }
}

@media screen and (max-width: 600px) {
  .verse-text {
    font-size: clamp(0.95rem, 4.5vw, 1.25rem);
  }
}

/* Container with clean tinted glass overlay */
.container {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  color: white;
  width: 100%;
  max-width: 900px;
  padding: 2.5rem;
  margin: 3rem auto;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.3s ease;
}

/* Responsive container padding */
@media screen and (max-width: 768px) {
  .container {
    padding: 2rem 1.5rem;
    margin: 2rem auto;
    border-radius: 16px;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
    margin: 1.5rem auto;
    border-radius: 12px;
  }
}

/* Enhanced link styling */
.container a {
  color: white;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.container a:visited {
  color: rgba(255, 255, 255, 0.9);
}

.container a:hover {
  color: rgba(255, 255, 255, 0.7);
  text-decoration-thickness: 2px;
}

.container a:focus {
  outline: 2px solid white;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Sidebar specific styles */
#verse-widget-sidebar {
  min-height: 280px;
}

#verse-widget-sidebar h2 {
  text-align: left;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.sidebar-verse-text {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  /* Added font-family inheritance */
  font-family: inherit;
}

/* Smooth transitions for theme changes */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Accessibility improvements */
.verse-text:focus {
  outline: 3px solid white;
  outline-offset: 4px;
  border-radius: 8px;
}

/* Loading state */
.verse-text.loading {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Print styles */
@media print {
  .votd-theme-toggle {
    display: none;
  }

  .verse-background {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .container {
    background: white;
    color: black;
    border: 1px solid #ddd;
  }

  .verse-text {
    color: black !important;
    text-shadow: none;
  }
}
