/* === Comments Button in Footer === */
.marker-popup-comments-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.25), rgba(184, 134, 11, 0.25));
  border: 1px solid rgba(218, 165, 32, 0.6);
  border-radius: 20px;
  color: #FFD700;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.marker-popup-comments-btn:hover {
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.4), rgba(184, 134, 11, 0.4));
  border-color: rgba(218, 165, 32, 0.8);
  box-shadow: 0 0 12px rgba(218, 165, 32, 0.5);
  transform: translateY(-1px);
}

/* Spacer untuk alignment jika tidak ada ys_id */
.marker-popup-ysid-spacer {
  width: 100px;
}

/* === Comments Modal === */
.comments-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.comments-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.comments-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: linear-gradient(135deg, rgba(139, 90, 43, 0.98) 0%, rgba(101, 67, 33, 0.98) 100%);
  border-radius: 12px;
  border: 2px solid rgba(218, 165, 32, 0.8);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(218, 165, 32, 0.4);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* === Modal Header === */
.comments-modal-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.3) 0%, rgba(184, 134, 11, 0.3) 100%);
  border-bottom: 2px solid rgba(218, 165, 32, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comments-modal-title {
  margin: 0;
  color: #FFD700;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.comments-modal-close {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(218, 165, 32, 0.5);
  border-radius: 50%;
  color: #FFD700;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.comments-modal-close:hover {
  background: rgba(218, 165, 32, 0.3);
  border-color: #FFD700;
  transform: rotate(90deg);
}

/* === Modal Body (Comments List) === */
.comments-modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 400px;
}

.comments-modal-body::-webkit-scrollbar {
  width: 8px;
}

.comments-modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.comments-modal-body::-webkit-scrollbar-thumb {
  background: rgba(218, 165, 32, 0.5);
  border-radius: 4px;
}

.comments-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(218, 165, 32, 0.7);
}

/* Loading State */
.comments-loading {
  text-align: center;
  padding: 40px 20px;
  color: #DAA520;
  font-size: 14px;
  font-style: italic;
}

/* Empty State */
.comments-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
  font-style: italic;
}

/* === Comment Item === */
.comment-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.comment-item:hover {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(218, 165, 32, 0.5);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-author {
  color: #FFD700;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.comment-time {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.comment-text {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

/* === Modal Footer (Comment Form) === */
.comments-modal-footer {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 2px solid rgba(218, 165, 32, 0.3);
}

/* Login Fallback */
.comments-login-prompt {
  text-align: center;
  padding: 20px;
}

.comments-login-text {
  color: #DAA520;
  font-size: 14px;
  margin-bottom: 15px;
}

.comments-login-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.4), rgba(184, 134, 11, 0.4));
  border: 1px solid rgba(218, 165, 32, 0.8);
  border-radius: 8px;
  color: #FFD700;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comments-login-btn:hover {
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.6), rgba(184, 134, 11, 0.6));
  box-shadow: 0 0 15px rgba(218, 165, 32, 0.6);
  transform: translateY(-2px);
}

/* Comment Form */
.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(218, 165, 32, 0.5);
  border-radius: 8px;
  color: #f5f5f5;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.comment-form-textarea:focus {
  border-color: #FFD700;
  box-shadow: 0 0 10px rgba(218, 165, 32, 0.5);
  background: rgba(0, 0, 0, 0.4);
}

.comment-form-textarea::placeholder {
  color: #999;
  font-style: italic;
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-char-count {
  color: #999;
  font-size: 12px;
}

.comment-char-count.warning {
  color: #ff9800;
}

.comment-char-count.error {
  color: #f44336;
}

.comment-submit-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
  transform: translateY(-2px);
}

.comment-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .comments-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .comments-modal-body {
    max-height: 300px;
  }
  
  .marker-popup-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .marker-popup-comments-btn {
    order: 3;
    flex: 1 1 100%;
    justify-content: center;
  }
  
  .marker-popup-ysid-spacer {
    display: none;
  }
}


/* Ikon notifikasi */
#notificationIcon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  background-image: url("https://ik.imagekit.io/k3lv5clxs/wherewindmeet/Simbol/notification.png?updatedAt=1763084712942");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 9700;
}
#notificationIcon:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Popup notifikasi */
#notificationBox {
  position: absolute;
  top: 10px;        /* muncul di bawah ikon */
  left: 50px;
  width: 260px;
  max-height: 300px;
  overflow-y: auto;
  background: rgba(10, 28, 61, 0.95);
  border: 2px solid #889dcb;
  border-radius: 10px;
  padding: 12px;
  display: none;    /* default tersembunyi */
  color: white;
  z-index: 9708;
  backdrop-filter: blur(4px);
}

#notificationBox h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: orange;
}

#notificationContent p {
  margin: 5px 0;
  font-size: 14px;
  font-family: 'Lato', sans-serif;
}