/* Verjonatura WordPress Plugin Styles */

/* WordPress compatibility - prevent theme conflicts */
.verjonatura-page * {
  box-sizing: border-box;
}

.verjonatura-page {
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset and base styles */
.main-wrapper * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.main-wrapper {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1fff4 0%, #a5d2c6 100%);
  color: #4b5b4c;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  position: relative;
  z-index: 999999;
  padding: 2rem 0;
}

.content-wrapper {
  width: 800px;
  padding: 2rem;
  border: solid 1px #b3ffc3;
  border-radius: 20px;
  background: linear-gradient(0deg, #f7f6ec, #fffdee38);
  box-shadow: 0 4px 15px rgba(67, 124, 98, 0.2);
}

.content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  justify-content: center;
}

#weather {
  grid-column: span 2;
}

#cardx {
  grid-column: span 1;
  grid-row: span 2;
}

#cards {
  height: 100%;
}

#cards-container {
  display: flex;
  height: 100%;
}

.content-wrapper h1 {
  position: relative;
  margin-bottom: -70px;
  bottom: 90px;
}

.logo {
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(2px 4px 6px rgba(85, 154, 96, 0.7));
}

.content-wrapper p {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.main-wrapper section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.weather-visuals {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 30vw;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: -1;
}

.weather-image {
  position: absolute;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  visibility: visible;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  --weather-color: rgba(212, 211, 198, 1);
  --weather-color-fade: rgba(212, 211, 198, 0.2);
}

.weather-image.active {
  opacity: 1;
}

.weather-section {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(67, 124, 98, 0.2);
  background-color: #d4d3c6;
}

#events {
  padding: 10px;
}

#weather-icon-bg {
  display: flex;
  background-color: #bcbaa5;
  border-radius: 60px;
  margin: 10px;
  color: #114940;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.weather-icon-wrapper {
  flex: 1;
  border-radius: 50%;
  padding: 10px;
  overflow: hidden;
}

#weather-icon-img {
  width: 100%;
  height: auto;
}

#weather-details {
  flex: 3;
  padding: 10px 10px 10px 0;
  text-align: left;
  font-size: 1rem;
}

#weather-details i {
  float: right;
  height: 120%;
  width: 15%;
  margin-top: -10px;
  shape-outside: radial-gradient(farthest-side at left,  transparent calc(100%), #fff 0);
}

.weather-info {
  font-size: 1.3rem;
  font-weight: 500;
  border-radius: 0 0 10px 10px;
  padding: 0.3rem 0.6rem;
  background-color: #4a5a4b;
  color: #f7f6ec;
  text-align: left;
}

.weather-info span {
  display: block;
}

#compass {
  align-self: center;
  display: flex;
  background-image:
    radial-gradient(circle at center, rgba(212, 211, 198, 1) 10%, rgba(212, 211, 198, 0) 70%);
  background-size: contain;
  background-repeat: no-repeat;
  background-origin: content-box;
  width: 150px;
  height: 150px;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

#wind-direction {
  font-size: 4rem;
  display: inline-block;
  color: #865b85;
}

.weather-type {
  font-size: 0.8rem;
}

#eventx {
  grid-column: span 2;
}

#events {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 50px;
}

.btn {
  flex: 1;
  border-radius: 8px;
  color: #ffffff;
  font-size: 20px;
  background: #538379;
  padding: 10px 20px 10px 20px;
  text-decoration: none;
}

.btn:hover {
  background: #6e9399;
  text-decoration: none;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  background: #f7f6ec;
  border: solid 1px #b3ffc3;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(67, 124, 98, 0.3);
  transform: scale(0.8) translateY(50px);
  transition: transform 0.3s ease-in-out;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #d4d3c6;
  border-bottom: 1px solid #b3ffc3;
}

.modal-header h2 {
  margin: 0;
  color: #4b5b4c;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #4b5b4c;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background-color: rgba(75, 91, 76, 0.1);
}

.modal-content {
  padding: 2rem;
  color: #4b5b4c;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.modal-content h3 {
  color: #4b5b4c;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.modal-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.modal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Button styles within modal */
.modal-content .btn {
  display: inline-block;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* AR Camera Styles */
#ar-camera-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#camera-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.camera-message {
  text-align: center;
  color: white;
  padding: 2rem;
}

.camera-message p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

#ar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#overlay-image {
  position: relative;
  width: 100%;
  height: 100%;
}

#alignment-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.guide-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid #b3ffc3;
}

.guide-corner.top-left {
  top: 20px;
  left: 20px;
  border-right: none;
  border-bottom: none;
}

.guide-corner.top-right {
  top: 20px;
  right: 20px;
  border-left: none;
  border-bottom: none;
}

.guide-corner.bottom-left {
  bottom: 20px;
  left: 20px;
  border-right: none;
  border-top: none;
}

.guide-corner.bottom-right {
  bottom: 20px;
  right: 20px;
  border-left: none;
  border-top: none;
}

.guide-text {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 15px;
  font-size: 0.9rem;
  text-align: center;
  white-space: nowrap;
}

#camera-controls {
  margin-top: 1rem;
  text-align: center;
}

#camera-controls .btn {
  margin: 0.25rem;
}

.hidden-message {
  background: rgba(179, 255, 195, 0.1);
  border: 2px solid #b3ffc3;
  border-radius: 15px;
  padding: 1.5rem;
  margin-top: 1rem;
  display: none;
}

.hidden-message h3 {
  color: #4CAF50;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.4rem;
}

.hidden-message p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hidden-message ul {
  list-style: none;
  padding-left: 0;
}

.hidden-message li {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  border-left: 4px solid #4CAF50;
}

/* Bloqueo Antropogénico Styles */
.event-container.bloqueo-antropogenico {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.bloqueo-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.bloqueo-card-wrapper {
  width: 250px;
  height: 300px;
}

.bloqueo-image-full {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.bloqueo-image-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.bloqueo-image-full .image-placeholder {
  font-size: 4rem;
  color: #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bloqueo-image-full.placeholder {
  background: #f0f0f0;
  border: 2px dashed #ddd;
}

.bloqueo-image-full.error {
  background: #ffe6e6;
  border: 2px dashed #ff9999;
}

.bloqueo-details {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
}

.bloqueo-info h3 {
  color: #d32f2f;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-align: center;
}

.bloqueo-detail-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.bloqueo-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bloqueo-detail-section h4 {
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.bloqueo-detail-section p {
  color: #666;
  line-height: 1.5;
  margin: 0;
}

.bloqueo-detail-section ul {
  margin: 0;
  padding-left: 1rem;
  color: #666;
}

.bloqueo-detail-section li {
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.image-preview-container {
  background-color: rgb(245, 245, 245);
  border: 2px dashed rgb(221, 221, 221);
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 16/9;
  padding: 10px;
}

#semilla-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  overflow: hidden;
  display: none;
}

.form-group.full-width {
  width: 100%;
}

.form-group.full-width > * {
  width: 100%;
}

.form-group.full-width > label {
  font-size: 1rem;
}

.form-group.full-width > input {
  font-size: 1.1rem;
}

/* Responsive design */

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
  .content-wrapper {
    width: 90%;
    padding: 1.5rem;
  }
  
  /* Keep grid layout on tablet but adjust sizing */
  .content {
    gap: 1.5rem;
  }
  
  .modal-container {
    width: 95vw;
    max-width: 800px;
    max-height: 95vh;
  }
  
  .modal-content {
    max-height: calc(95vh - 120px);
  }
  
  /* AR Camera larger on tablet */
  #ar-camera-container {
    height: 400px;
  }
  
  /* Form elements on tablet */
  .form-group.full-width > input {
    font-size: 16px;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .logo {
    max-width: 250px;
  }

  .content-wrapper p {
    font-size: 1rem;
  }

  .main-wrapper {
    min-height: 100vh;
    height: auto;
    padding: 1rem 0;
    align-items: flex-start;
  }
  
  .content-wrapper {
    width: 95%;
    margin: 0 auto;
    max-width: 800px;
  }
  
  /* Make content grid single column on mobile */
  .content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-content: center;
  }
  
  /* Reset grid positioning for mobile */
  #weather {
    grid-column: span 1;
  }
  
  #cardx {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  #eventx {
    grid-column: span 1;
  }
  
  /* Full screen modal on mobile */
  .modal-container {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    transform: scale(1) translateY(0);
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
    border-radius: 0;
    flex-shrink: 0;
  }
  
  .modal-header h2 {
    font-size: 1.3rem;
  }
  
  .modal-content {
    padding: 1.5rem;
    max-height: none;
    height: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    flex: 1;
    min-height: 0; /* Allow flex item to shrink below content size */
  }
  
  /* AR Camera full screen on mobile */
  #ar-camera-container {
    height: 70vh;
    max-height: 500px;
    border-radius: 0;
  }
  
  .guide-corner {
    width: 20px;
    height: 20px;
  }
  
  .guide-text {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  /* Events buttons stack on mobile */
  #events {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    font-size: 18px;
    padding: 12px 20px;
  }
  
  /* Form elements responsive on mobile */
  .form-group.full-width > input,
  .form-group.full-width > label {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .form-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .form-buttons .btn {
    width: 100%;
    margin: 0;
  }
  
  /* Bloqueo card responsive */
  .bloqueo-card-container {
    min-height: 250px;
  }
  
  .bloqueo-card-wrapper {
    width: 100%;
    max-width: 300px;
    height: 250px;
  }
  
  /* Sightings grid responsive */
  .sightings-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .sighting-card-wrapper {
    width: 100%;
    max-width: 280px;
  }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
  .main-wrapper {
    padding: 0.5rem 0;
  }
  
  .content-wrapper {
    width: 98%;
    margin: 0 auto;
    padding: 1rem;
  }
  
  .logo {
    max-width: 200px;
  }
  
  .content {
    gap: 1rem;
  }
  
  .weather-section {
    min-height: auto;
  }
  
  .modal-header {
    padding: 0.75rem 1rem;
  }
  
  .modal-content {
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .btn {
    font-size: 16px;
    padding: 10px 16px;
  }
  
  /* Compass smaller on very small screens */
  #compass {
    width: 120px;
    height: 120px;
  }
  
  #wind-direction {
    font-size: 3rem;
  }
}