/*
 * Detail / Single-Item Page Styles
 *
 * Used by: attraction detail, event detail, accommodation detail,
 * dining detail, activity detail, pasalubong detail pages.
 *
 * Depends on: typography.css, global.css (loaded before this).
 */

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
  background: #f9fafb;
  padding: var(--space-md) 0;
}

.breadcrumb a {
  color: var(--color-brand-secondary);
  text-decoration: none;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) 0;
}

.breadcrumbs a {
  color: var(--color-brand-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumbs a:hover {
  color: var(--color-brand-primary);
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: #d1d5db;
  user-select: none;
}

.breadcrumbs .current {
  color: #374151;
  font-weight: var(--font-weight-medium);
}

/* ============================================
   ATTRACTION DETAILS
   ============================================ */

.attraction-details {
  padding-top: var(--space-sm);
  margin-top: 10px;
}

.attraction-header {
  margin-top: 0;
  padding-top: 0;
}

.attraction-header h1 {
  color: var(--color-brand-primary);
  margin-bottom: var(--space-md) !important;
  margin-top: 0;
  text-align: center;
}

.attraction-details h2 {
  color: var(--color-brand-primary);
  font-size: 1.8rem;
  margin-bottom: var(--space-lg);
  margin-top: var(--space-xl);
}

.attraction-details h3 {
  color: var(--color-brand-secondary);
  font-size: var(--font-xl);
  margin-bottom: var(--space-md);
}

.attraction-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: var(--space-xl) !important;
  margin-bottom: var(--space-xl) !important;
}

/* Photo Section */
.photo-section .main-photo {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.photo-section .main-photo img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.photo-thumbnails-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #0369a1 var(--color-bg-hover);
}

.photo-thumbnails-wrapper::-webkit-scrollbar {
  height: 6px;
}

.photo-thumbnails-wrapper::-webkit-scrollbar-track {
  background: var(--color-bg-hover);
  border-radius: 3px;
}

.photo-thumbnails-wrapper::-webkit-scrollbar-thumb {
  background: #0369a1;
  border-radius: 3px;
}

.photo-thumbnails {
  display: flex;
  gap: var(--space-sm);
  min-width: min-content;
}

.thumbnail {
  width: 80px;
  height: 60px;
  min-width: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.thumbnail.active,
.thumbnail:hover {
  opacity: 1;
  border: 2px solid #0369a1;
}

/* Attraction Info Sidebar */
.attraction-info {
  background: white;
  padding: var(--space-xl);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  height: fit-content;
}

.rating-stats {
  margin-bottom: var(--space-lg);
}

.location-details {
  margin-bottom: var(--space-xl);
}

.attraction-info .detail-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  margin-bottom: 0.75rem;
  color: var(--color-text-secondary);
}

.detail-item i {
  color: var(--color-brand-secondary);
  width: 20px;
}

.add-to-itinerary-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--color-brand-secondary), #ff6b35);
  color: white;
  border: none;
  padding: var(--space-md);
  border-radius: 8px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: transform 0.3s;
}

.add-to-itinerary-btn:hover {
  transform: translateY(-2px);
}

/* About & Visitor Guide */
.about-attraction {
  margin-bottom: var(--space-2xl);
}

.visitor-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.guide-section h3 {
  color: var(--color-brand-secondary);
  margin-bottom: var(--space-md);
}

.guide-section ul {
  list-style: none;
  padding: 0;
}

.guide-section li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid #f0f0f0;
}

.guide-section li:before {
  content: '•';
  color: var(--color-brand-secondary);
  margin-right: var(--space-sm);
}

/* Nearby Sections */
.nearby-resorts, .nearby-activities {
  margin-bottom: var(--space-2xl);
}

/* ============================================
   VISITOR REVIEWS
   ============================================ */

.visitor-reviews {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: var(--space-2xl);
}

.visitor-reviews h2 {
  color: var(--color-brand-primary);
  margin-bottom: var(--space-xl);
  font-size: var(--font-3xl);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.review-item {
  background: white;
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

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

.review-rating {
  font-size: var(--font-xl);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.review-item h4 {
  color: var(--color-text-primary);
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

.review-text {
  color: var(--color-text-secondary);
  font-size: var(--font-base);
  line-height: var(--line-height-relaxed);
  font-style: italic;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-border);
}

.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--color-text-tertiary);
  flex-wrap: wrap;
}

.review-author .verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-success);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--font-xs);
  font-weight: var(--font-weight-semibold);
}

.review-date {
  color: var(--color-text-tertiary);
}

.view-all-reviews {
  background: none;
  border: 2px solid var(--color-brand-secondary);
  color: var(--color-brand-secondary);
  padding: 0.75rem var(--space-lg);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.view-all-reviews:hover {
  background: var(--color-brand-secondary);
  color: white;
}

.review-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
}

.view-all-reviews-btn, .write-review-btn {
  padding: var(--space-md) var(--space-xl);
  border: 2px solid var(--color-brand-secondary);
  background: white;
  color: var(--color-brand-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-size: var(--font-base);
  font-weight: var(--font-weight-semibold);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.view-all-reviews-btn:hover, .write-review-btn:hover {
  background: var(--color-brand-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(44, 90, 160, 0.2);
}

.write-review-btn {
  background: var(--color-brand-secondary);
  color: white;
}

.write-review-btn:hover {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
}

/* ============================================
   REVIEW MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-md);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl);
  border-bottom: 2px solid var(--color-border-light);
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-brand-primary);
}

.modal-close {
  background: var(--color-border-light);
  border: none;
  font-size: var(--font-2xl);
  color: var(--color-text-tertiary);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-border);
  color: var(--color-text-primary);
  transform: rotate(90deg);
}

.review-form {
  padding: var(--space-xl);
}

.review-form .form-group label .required {
  color: var(--color-error);
  margin-left: 4px;
}

.review-form .form-group input,
.review-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-size: var(--font-base);
  background: #f9fafb;
  transition: all 0.3s;
}

.review-form .form-group input:focus,
.review-form .form-group textarea:focus {
  outline: none;
  border-color: var(--color-brand-secondary);
  background: white;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.review-form .form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.star-rating {
  display: flex;
  gap: var(--space-sm);
  font-size: 2.5rem;
  margin-top: var(--space-sm);
}

.star-rating .star {
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.2;
  filter: grayscale(100%);
}

.star-rating .star.active {
  opacity: 1;
  filter: grayscale(0%);
}

.star-rating .star:hover {
  transform: scale(1.15);
  opacity: 0.8;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-2xl);
}

.form-actions .btn-cancel,
.form-actions .btn-submit {
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: var(--font-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  width: auto;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 0;
}

.form-actions .btn-cancel {
  background: var(--color-border-light);
  color: var(--color-text-secondary);
}

.form-actions .btn-cancel:hover {
  background: var(--color-border);
  color: var(--color-text-primary);
}

.form-actions .btn-submit {
  background: linear-gradient(135deg, var(--color-brand-secondary) 0%, var(--color-brand-primary) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(44, 90, 160, 0.2);
}

.form-actions .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.form-actions .btn-submit:active {
  transform: translateY(0);
}

.form-actions .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   SUCCESS NOTIFICATION
   ============================================ */

.success-notification {
  position: fixed;
  top: 90px;
  right: var(--space-lg);
  z-index: 10000;
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

.notification-content {
  background: white;
  border-radius: 12px;
  padding: var(--space-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--color-success);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  max-width: 400px;
  min-width: 320px;
}

.notification-icon {
  font-size: 2rem;
  color: var(--color-success);
  flex-shrink: 0;
}

.notification-text h4 {
  margin: 0 0 var(--space-xs) 0;
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.notification-text p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}

.notification-close {
  background: none;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  font-size: var(--font-xl);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.notification-close:hover {
  background: var(--color-border-light);
  color: var(--color-text-primary);
}

/* ============================================
   EVENT DETAIL PAGE
   ============================================ */

.detail-page {
  background: #f8fafc;
}

.detail-page-hero {
  height: 400px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-top: 80px;
}

.detail-page-hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}

.detail-page-hero-content h1 {
  color: white;
  margin-bottom: 1rem;
}

.detail-page-hero .detail-page-meta {
  display: flex;
  gap: 2rem;
  color: white;
}

.detail-page-hero .detail-page-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Info Bar */
.event-info-bar {
  background: white;
  padding: 2rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-item i {
  font-size: var(--font-3xl);
  color: var(--color-brand-secondary);
}

.info-item strong {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  margin-bottom: 0.25rem;
}

.info-item p {
  margin: 0;
}

/* Event Detail Layout */
.detail-page-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.detail-page-layout .event-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
}

.detail-page-layout .event-content h2 {
  margin-bottom: 1rem;
}

.event-description p {
  margin-bottom: 1rem;
}

/* Gallery */
.event-gallery {
  margin-top: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* Venue */
.detail-page-venue {
  margin-top: 3rem;
}

.venue-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 1rem;
}

.venue-card i {
  font-size: var(--font-3xl);
  color: var(--color-brand-secondary);
}

.venue-card h3 {
  margin: 0 0 0.25rem 0;
}

.venue-card p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* Sidebar */
.detail-page-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.registration-card,
.past-event-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.registration-card h2,
.past-event-card h2 {
  margin-bottom: 1.5rem;
}

/* Registration Form */
.registration-form h3 {
  color: var(--color-brand-secondary);
  font-size: var(--font-base);
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.registration-form h3:first-of-type {
  margin-top: 0;
}

.registration-form .form-group {
  margin-bottom: 1rem;
}

.registration-form .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-sm);
}

.form-hint {
  color: var(--color-text-secondary);
  font-size: var(--font-xs);
  margin-top: 4px;
  display: block;
}

.registration-form .form-group input,
.registration-form .form-group select,
.registration-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: var(--font-sm);
  font-family: inherit;
}

.registration-form .form-group input:focus,
.registration-form .form-group select:focus,
.registration-form .form-group textarea:focus {
  outline: none;
  border-color: var(--color-brand-secondary);
}

.registration-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.registration-form .checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.registration-form .checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.3s;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Past Event Card */
.past-event-card p {
  margin-bottom: 1.5rem;
}

.event-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.stat-item strong {
  display: block;
  font-size: var(--font-3xl);
  color: var(--color-brand-secondary);
  margin-bottom: 0.25rem;
}

.stat-item span {
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
}

/* ============================================
   DETAIL RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .detail-page-layout {
    grid-template-columns: 1fr;
  }

  .detail-page-sidebar {
    position: static;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .attraction-layout {
    grid-template-columns: 1fr;
  }

  .visitor-guide {
    grid-template-columns: 1fr;
  }

  .detail-page-hero {
    height: 300px;
  }

  .detail-page-hero .detail-page-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .registration-form .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-header,
  .review-form {
    padding: var(--space-lg);
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn-cancel,
  .form-actions .btn-submit {
    width: 100%;
  }

  .success-notification {
    right: var(--space-sm);
    left: var(--space-sm);
  }

  .notification-content {
    min-width: auto;
    max-width: 100%;
  }
}
