/* css/popup.css */
/* Style bersama untuk popup toast (login) & modal konfirmasi (logout) */

/* ═══ MODAL (popup tengah layar) ═══ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 360px;
  width: 85%;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon {
  width: 50px;
  height: 50px;
  background-color: #f59e0b;
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px auto;
}

.modal-box h3 {
  margin: 0 0 10px 0;
  color: #333333;
  font-size: 20px;
}

.modal-box p {
  margin: 0 0 20px 0;
  color: #666666;
  font-size: 14px;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btn {
  background-color: #dc2626;
  color: #ffffff;
  border: none;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex: 1;
}

.modal-btn:hover {
  background-color: #b91c1c;
}

.modal-btn--secondary {
  background-color: #f1f5f9;
  color: #444444;
}

.modal-btn--secondary:hover {
  background-color: #e2e8f0;
}

/* ═══ TOMBOL LOGOUT MOBILE (title-section, hanya tampil di HP) ═══ */
.logout-btn-mobile {
  display: none;
}

@media (max-width: 768px) {
  .logout-btn-mobile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 14px;
    border-radius: var(--border-radius-sm, 8px);
    background-color: #fee2e2;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    transition: background-color .2s ease;
  }

  .logout-btn-mobile:hover {
    background-color: #fecaca;
  }

  .logout-btn-mobile img {
    width: 16px;
    height: 16px;
    /* Recolor ikon logout jadi merah supaya senada sama background */
    filter: invert(28%) sepia(87%) saturate(2476%) hue-rotate(343deg) brightness(88%) contrast(93%);
  }
}

/* ═══ TOAST (popup kanan atas) ═══ */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  padding: 15px 18px;
  background: #ffffff;
  border-left: 5px solid #059669;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateX(120%);
  transition: .35s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.toast.toast--error {
  border-left-color: #dc2626;
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
}

.toast.toast--error .toast-icon {
  background: #dc2626;
}

.toast-title {
  font-weight: 600;
  color: #222;
}

.toast-message {
  color: #666;
  font-size: 14px;
  margin-top: 3px;
}