/* Traveller Directory Styles */

.traveller-directory-container {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Search Interface */
.traveller-search-container {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.traveller-search-form {
  margin-bottom: 1rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.traveller-search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #2c3e50;
  outline: none;
}

.traveller-search-input::placeholder {
  color: #6c757d;
  font-style: italic;
}

.search-submit-button {
  padding: 1rem 1.25rem;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit-button:hover {
  background: #005a87;
}

.search-submit-button .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.search-clear-button {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-clear-button:hover {
  background: #495057;
}

.search-results-info {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.results-count {
  color: #007cba;
  font-weight: 600;
}

/* No Results Message */
.no-results-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
}

.no-results-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results-content .dashicons {
  font-size: 48px;
  color: #dee2e6;
  width: 48px;
  height: 48px;
}

.no-results-content p {
  margin: 0;
  font-size: 1.1rem;
  color: #6c757d;
  font-weight: 500;
}

.no-results-content small {
  color: #adb5bd;
  font-size: 0.9rem;
}

/* Loading State */
.search-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.search-loading .dashicons {
  animation: spin 1s linear infinite;
  font-size: 16px;
  width: 16px;
  height: 16px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
}

.load-more-item {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
}

.load-more-btn {
  background: #007cba;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  background: #005a87;
  transform: translateY(-1px);
}

.load-more-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* Error Message */
.error-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
}

.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-content .dashicons {
  font-size: 48px;
  color: #dc3545;
  width: 48px;
  height: 48px;
}

.error-content p {
  margin: 0;
  font-size: 1.1rem;
  color: #6c757d;
  font-weight: 500;
}

.traveller-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.traveller-item {
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.traveller-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #d1d9e0;
}

.traveller-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
  width: 100%;
}

.traveller-card-header {
  position: relative;
  height: 120px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.traveller-card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
}

.traveller-avatar {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.traveller-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.traveller-item:hover .traveller-avatar {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.traveller-card-content {
  padding: 1.5rem 1.5rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.traveller-name {
  font-weight: 700;
  color: #2c3e50;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.traveller-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.traveller-name a:hover {
  color: #007cba;
}

.traveller-follow-section {
  margin-bottom: 1.25rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.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;
}

.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);
}

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

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

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

.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);
}

.traveller-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  margin-top: auto;
}

.traveller-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  background: #f8f9fa;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.traveller-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #007cba, #00a0d2);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.traveller-item:hover .traveller-stat {
  background: #ffffff;
  border-color: #d1d9e0;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.traveller-item:hover .traveller-stat::before {
  transform: scaleX(1);
}

.traveller-stat .stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: #007cba;
  margin-bottom: 0.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.traveller-stat .stat-label {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  line-height: 1.2;
}

.countries-display {
  margin-top: 1rem;
}

/* Loading state for buttons */
.follow-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .traveller-list {
    max-width: 900px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .traveller-list {
    max-width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .traveller-item {
    max-width: 100%;
  }
  
  .traveller-card {
    min-height: 340px;
  }
  
  .traveller-card-header {
    height: 100px;
  }
  
  .traveller-avatar {
    width: 50px;
    height: 50px;
  }
  
  .traveller-card-content {
    padding: 1.25rem 1.25rem 1rem;
  }
  
  .traveller-name {
    font-size: 1.1rem;
  }
  
  .traveller-stats {
    gap: 0.75rem;
  }
  
  .traveller-stat {
    padding: 0.875rem 0.5rem;
  }
  
  .traveller-stat .stat-number {
    font-size: 1.3rem;
  }
  
  .traveller-stat .stat-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .traveller-list {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 0.5rem;
  }
  
  .traveller-card {
    min-height: 320px;
  }
  
  .traveller-card-content {
    padding: 1rem 1rem 0.875rem;
  }
  
  .traveller-card-header {
    height: 90px;
  }
  
  .traveller-avatar {
    width: 45px;
    height: 45px;
  }
  
  .follow-button {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
}
