/* stations.css */
.stations-page {
  padding: 2rem 0;
}

.search-section {
  margin-bottom: 1rem;
  position: relative;
  z-index: 100; /* 가장 높은 우선순위 */
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 검색 입력 그룹 */
.search-input-group {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 0.5rem; /* 0.75rem → 0.5rem */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem; /* 1rem → 0.9rem */
  height: 40px; /* 48px → 40px */
}

.search-input-group .btn {
  white-space: nowrap;
  min-width: 60px; /* 80px → 60px */
  height: 40px; /* 48px → 40px */
  padding: 0 0.75rem; /* 패딩 조정 */
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 필터 영역 */
.filters {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0; /* 좌우 패딩 제거 */
  background-color: #f8f9fa;
  border-radius: 4px;
  padding-left: 0; /* 왼쪽 패딩 완전 제거 */
  padding-right: 1rem; /* 오른쪽 패딩만 유지 */
  position: relative; /* 드롭다운 위치 기준점 */
  z-index: 1; /* 기본 z-index */
}

.filters select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 120px;
  position: relative;
  z-index: 10; /* 드롭다운이 다른 요소보다 위에 표시 */
}

.filters .btn {
  margin-left: auto;
  white-space: nowrap;
}
/* 작은 초기화 버튼 */
.btn-reset {
  padding: 6px 12px;
  font-size: 12px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
  height: 34px; /* select와 높이 맞춤 */
}

.btn-reset:hover {
  background: #7f8c8d;
}
.loading-message {
  text-align: center;
  padding: 3rem 0;
  color: #666;
  font-size: 1.1rem;
}

.loading-message p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loading-message p::before {
  content: '⏳';
  animation: spin 2s linear infinite;
}

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

.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.station-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.station-card:hover {
  transform: translateY(-3px);
}

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

.station-info h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.station-address {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.station-reactions {
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.reaction-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.reaction-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.reaction-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.reaction-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.like-btn.active {
  background: #28a745;
  border-color: #28a745;
}

.dislike-btn.active {
  background: #dc3545;
  border-color: #dc3545;
}

.review-btn:hover {
  background: #6f42c1;
  color: white;
  border-color: #6f42c1;
}

.update-time {
  margin: 0;
  padding: 2px 0;
  font-size: 0.75em;
  color: #999;
  opacity: 0.7;
  text-align: right;
}

.charger-details {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.charger-details:last-child {
  margin-bottom: 0;
}

.charger-details h4 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.detail-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-tags span {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.status-available {
  background: #e8f5e8 !important;
  color: #388e3c !important;
}

.status-charging {
  background: #fff3e0 !important;
  color: #f57c00 !important;
}

.status-broken {
  background: #ffebee !important;
  color: #d32f2f !important;
}

.status-offline {
  background: #f3e5f5 !important;
  color: #7b1fa2 !important;
}

/* 한줄평 모달 스타일 */
.reviews-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #eee;
}

.reviews-section h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1rem;
}

.reviews-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fafafa;
}

.review-item {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid #007bff;
  position: relative;
}

.review-item:last-child {
  margin-bottom: 0;
}

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

.review-author {
  font-size: 0.85rem;
  font-weight: bold;
  color: #2c3e50;
}

.review-date {
  font-size: 0.75rem;
  color: #666;
}

.review-ip {
  font-size: 0.75rem;
  color: #666;
}

.review-content {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.delete-review-btn {
  background: none;
  border: 1px solid #dc3545;
  color: #dc3545;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.delete-review-btn:hover {
  background: #ffebee;
}

.my-review {
  border-left-color: #28a745;
  background: #f8fff9;
}

.loading-reviews {
  text-align: center;
  color: #666;
  padding: 2rem;
  font-style: italic;
}

.empty-reviews {
  text-align: center;
  color: #666;
  padding: 2rem;
}

.write-review-section h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  margin-top: 1rem;
}

.btn-outline:hover {
  background: #007bff;
  color: white;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  margin: 0;
}

.close {
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #999;
}

.modal-body {
  padding: 1.5rem;
}

.station-name-display {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #2c3e50;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
}

.char-count {
  text-align: right;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
}

.login-required {
  text-align: center;
  padding: 2rem 1rem;
}

.login-required p {
  margin-bottom: 1rem;
  color: #666;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions .btn {
  flex: 1;
}

.empty-message {
  text-align: center;
  color: #666;
  font-size: 1rem;
  padding: 2rem;
}

.error-message {
  text-align: center;
  color: #dc3545;
  padding: 1rem;
  background: #f8d7da;
  border-radius: 5px;
  margin: 1rem 0;
}

/* 반응형 */
@media (max-width: 768px) {
  .search-input-group {
    flex-wrap: wrap;
  }

  .search-input-group .btn {
    min-width: 60px;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filters select,
  .filters .btn {
    width: 100%;
    margin-left: 0;
  }
  .btn-reset {
    align-self: flex-start;
    width: auto;
  }
  .stations-grid {
    grid-template-columns: 1fr;
  }

  .station-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .reaction-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .detail-tags {
    flex-direction: column;
  }

  .modal-content {
    margin: 2% auto;
    width: 95%;
    max-height: 95vh;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-actions {
    flex-direction: column;
  }
}