/**
 * WP Travel Plus Public Traveller Profile Styles
 *
 * This file contains styles specifically for the public-facing traveller
 * profile page. It includes a subset of styles from the main profile CSS
 * for a read-only view.
 */

/* --- General Layout --- */
.wp-travel-plus-profile-container {
  width: 100%;
  margin: 2rem 0; /* container defines width; keep vertical spacing */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: #333;
}

.profile-section {
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  gap: 2rem;
}

.profile-avatar .avatar {
  border-radius: 50%;
  margin-right: 0;
  flex-shrink: 0;
}

.profile-info {
  flex-grow: 1;
}

.profile-info h1 {
  margin: 0 0 0.25rem;
  font-size: 2rem;
  font-weight: 600;
  color: #0d2b4f;
}

.profile-info p {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #666;
}

.profile-follow-info {
  margin-top: 0.5rem;
}

.follower-count {
  font-size: 0.9rem;
  color: #007cba;
  font-weight: 600;
  background: #f0f8ff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  display: inline-block;
}

.profile-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.profile-actions .follow-button {
  background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 120px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
  letter-spacing: 0.02em;
}

.profile-actions .follow-button:hover {
  background: linear-gradient(135deg, #005a87 0%, #004066 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.profile-actions .follow-button.unfollow-button {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.profile-actions .follow-button.unfollow-button:hover {
  background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.profile-actions .follow-button.follow-login-required {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.profile-actions .follow-button.follow-login-required:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.profile-actions .follow-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* --- Stats Grid --- */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1rem;
  text-align: center;
}

@media (max-width: 768px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-item .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Section Headers --- */
.profile-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #0d2b4f;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

.section-explainer {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-top: -0.75rem;
  margin-bottom: 1.5rem;
}

/* --- Document List --- */
.document-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.document-item:last-child {
  border-bottom: none;
}

.document-details {
  flex-grow: 1;
}

.document-name {
  font-weight: 600;
}

.document-meta {
  display: block;
  font-size: 0.85rem;
  color: #777;
  margin-top: 0.25rem;
}

/* --- Followers List --- */
.follower-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.follower-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 1rem;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out, color 0.2s;
}

.follower-item a:hover {
  background-color: #f5f5f5;
  color: #333;
}

.follower-item a:hover .follower-name {
  text-decoration: none;
}

.follower-item .avatar {
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 2px solid #eee;
  transition: border-color 0.2s;
}

.follower-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.followers-more {
  margin-top: 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  font-size: 0.9rem;
}

/* --- Companion List --- */
.companion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.companion-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 1rem;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out, color 0.2s;
}

.companion-item a:hover {
  background-color: #f5f5f5;
  color: #333;
}

.companion-item a:hover .companion-name {
  text-decoration: none;
}

.companion-item .avatar {
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 2px solid #eee;
  transition: border-color 0.2s;
}

.companion-name {
  font-weight: 500;
  font-size: 0.9rem;
}

/* --- Country List --- */
.country-badge-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.country-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: #3b82f6;
  color: white;
}

/* --- Map Styles --- */
.wp-travel-plus-map-container {
  height: 400px;
  background-color: #f0f2f5;
  border-radius: 8px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.wp-travel-plus-map-container .map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-size: 1.1rem;
}

.leaflet-container {
  border-radius: 4px;
}

.country-tooltip {
  background-color: rgba(0, 0, 0, 0.8) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  box-shadow: none !important;
}

.country-tooltip::before {
  border-right-color: rgba(0, 0, 0, 0.8) !important;
}

/* --- Status Groups --- */
.status-group {
  margin-bottom: 3rem;
}

.status-group:last-child {
  margin-bottom: 0;
}

.status-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Trip Grid Styles --- */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem 1.5rem;
}

.trip-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: transparent;
  border: 1px solid transparent;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.trip-card:hover {
  background-color: #f8f9fa;
  border-color: #f0f0f0;
}

.trip-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.trip-card-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
}

.trip-card-avatar img,
.trip-card-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trip-card-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e9ecef;
}

.trip-card-avatar-placeholder .dashicons {
  font-size: 30px;
  width: 30px;
  height: 30px;
  color: #adb5bd;
}

.trip-card-body {
  flex-grow: 1;
}

.trip-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #212529;
}

.trip-card-subline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 1rem;
}

.trip-card-travellers {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.trip-card-travellers .avatar {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.trip-card-dates {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
  flex-shrink: 0;
}

.trip-card-divider {
  width: 25px;
  height: 2px;
  background-color: #dee2e6;
  margin: 0.75rem 0;
}

.trip-card-excerpt {
  font-size: 1rem;
  color: #495057;
  line-height: 1.6;
}
.trip-card-excerpt p {
  margin: 0;
}

.trip-card-status-wrapper {
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 1rem;
}

.trip-card-status {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background-color: #6c757d; /* Default Grey */
  text-transform: capitalize;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Unified Status Colors */
.status-dreaming {
  background-color: #95a5a6; /* Asbestos Gray */
}
.status-active {
  background-color: #2ecc71; /* Emerald Green */
}
.status-a-memory {
  background-color: #3498db; /* Peter River Blue */
}
.status-bucket-list {
  background-color: #1abc9c; /* Turquoise */
}
