?/** ============================================================
    COMPONENT: Modals & Lightbox
    Source: style.css, details.css
    ============================================================ */

/* --- Generic modal overlay --- */
.modal-overlay {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.6); display: none;
  justify-content: center; align-items: center; z-index: 9999;
}
.modal-box {
  width: 420px; background: var(--surface-card); border-radius: var(--radius-md);
  padding: 20px; position: relative; max-height: 90vh; overflow-y: auto;
}
.close-btn {
  position: absolute; top: 10px; right: 10px; font-size: 26px;
  cursor: pointer; color: var(--ink-600);
}

/* --- Auth modal --- */
.login-modal-overlay {
  display: none; position: fixed; z-index: 10001; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px); justify-content: center; align-items: center;
}
.login-modal-container {
  position: relative;
  width: 95%;
  max-width: 450px;
  display: block;
}
.close-login-modal {
  position: absolute; right: 10px; top: -1px; color: var(--ink-600); font-size: 30px;
  cursor: pointer; z-index: 10002;
}

/* --- Auth modal: reset view + dark mode (single source) --- */
#auth-reset-section .btn-primary {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  border: none;
  transition: all 0.3s ease;
}
#auth-reset-section .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}
@media (prefers-color-scheme: dark) {
  .login-modal-container .card {
    background: #2d2d2d;
    color: #fff;
  }
  .login-modal-container .text-muted {
    color: #b0b0b0 !important;
  }
  .login-modal-container input.form-control {
    background-color: #3d3d3d;
    border-color: #4d4d4d;
    color: #fff;
  }
  .login-modal-container input.form-control:focus {
    background-color: #3d3d3d;
    color: #fff;
  }
  .close-login-modal {
    color: #fff;
  }
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: hsl(245 60% 12% / 0.88);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 11000;
}
.lightbox-overlay.active { display: flex; }

.lightbox-image-container {
  position: relative;
  width: 90%;
  max-width: 700px;
  height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  pointer-events: auto;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: hsl(159 30% 100% / 0.1);
  color: #fff;
  border: 1px solid hsl(159 30% 100% / 0.3);
  font-size: 24px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 11002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
}
.lightbox-arrow:hover {
  background: hsl(159 30% 100% / 0.2);
  scale: 1.1;
}
.lightbox-arrow.left { left: 10px; }
.lightbox-arrow.right { right: 10px; }

@media (max-width: 768px) {
  .lightbox-arrow.left { left: 10px; }
  .lightbox-arrow.right { right: 10px; }
  .lightbox-image-container { width: 95%; }
}
