/**
 * Travel Gallery Block Frontend Styles
 */

/* Main Gallery Container */
.wp-travel-plus-travel-gallery {
  margin: 1.5rem 0;
}

/* Placeholder and Error States */
.wp-travel-plus-travel-gallery-placeholder,
.wp-travel-plus-travel-gallery-error,
.wp-travel-plus-travel-gallery-empty {
  padding: 2rem;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
  font-style: italic;
}

.wp-travel-plus-travel-gallery-error {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.wp-travel-plus-travel-gallery-empty {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

/* Gallery Caption */
.wp-travel-plus-travel-gallery-caption {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.wp-travel-plus-travel-gallery-caption p {
  margin: 0;
  font-size: 0.95rem;
  color: #495057;
}

.wp-travel-plus-travel-gallery-caption a {
  color: #007cba;
  text-decoration: none;
  font-weight: 600;
}

.wp-travel-plus-travel-gallery-caption a:hover {
  color: #005a87;
  text-decoration: underline;
}

/* Block Alignment */
.wp-block-wp-travel-plus-travel-gallery.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.wp-block-wp-travel-plus-travel-gallery.alignfull {
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wp-travel-plus-travel-gallery {
    margin: 1rem 0;
  }

  .wp-travel-plus-travel-gallery-caption {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }

  .wp-travel-plus-travel-gallery-caption p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .wp-travel-plus-travel-gallery-caption {
    padding: 0.5rem;
  }

  .wp-travel-plus-travel-gallery-caption p {
    font-size: 0.85rem;
  }
}

/* Ensure the gallery uses the existing activity gallery styles */
.wp-travel-plus-travel-gallery .activity-gallery-unified {
  /* Inherit all existing gallery styles from frontend.css */
  /* The main frontend.css file is loaded as a dependency */
}

/* Override any conflicting styles for the block context */
.wp-travel-plus-travel-gallery .activity-gallery-unified {
  margin-bottom: 0; /* Remove bottom margin since we have our own caption */
}

/* Ensure proper spacing between gallery and caption */
.wp-travel-plus-travel-gallery
  .activity-gallery-unified
  + .wp-travel-plus-travel-gallery-caption {
  margin-top: 1rem;
}

/* Print Styles */
@media print {
  .wp-travel-plus-travel-gallery-caption {
    background: transparent;
    border: 1px solid #000;
  }

  .wp-travel-plus-travel-gallery-caption a {
    color: #000;
    text-decoration: underline;
  }
}
