/* --------------------------------------------------------------------------
   Quick Switcher Modal (Ctrl+O)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-box {
  width: 560px;
  max-width: 90vw;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popup);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-input-wrapper {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 15px;
  color: var(--text-normal);
}

.modal-input-wrapper input:focus {
  outline: none;
  border: none;
}

.modal-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  list-style: none;
}

.modal-result-item {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-result-item:hover,
.modal-result-item.selected {
  background: var(--bg-active);
  color: var(--text-accent);
}

.result-name {
  font-weight: 500;
  font-size: 13.5px;
}

.result-path {
  font-size: 11.5px;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Sweet Popup Dialogs (SweetAlert-style Animated Modals)
   -------------------------------------------------------------------------- */
.sweet-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sweetFadeIn 0.18s ease-out forwards;
}

.sweet-popup-backdrop.closing {
  animation: sweetFadeOut 0.16s ease-in forwards;
}

.sweet-popup-box {
  width: 420px;
  max-width: 92vw;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 28px 24px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: sweetPopIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.sweet-timer-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--color-green));
  transform-origin: left center;
  animation-name: sweetTimerShrink;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes sweetTimerShrink {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.sweet-popup-box.closing {
  animation: sweetPopOut 0.15s ease-in forwards;
}

.sweet-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  animation: sweetIconPulse 0.35s ease-out;
}

.sweet-icon svg {
  width: 32px;
  height: 32px;
}

.sweet-icon-warning {
  background: rgba(245, 158, 11, 0.14);
  color: var(--color-yellow);
  border: 2px solid rgba(245, 158, 11, 0.35);
}

.sweet-icon-error {
  background: rgba(239, 68, 68, 0.14);
  color: var(--color-red);
  border: 2px solid rgba(239, 68, 68, 0.35);
}

.sweet-icon-success {
  background: rgba(16, 185, 129, 0.14);
  color: var(--color-green);
  border: 2px solid rgba(16, 185, 129, 0.35);
}

.sweet-icon-info,
.sweet-icon-question {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-accent);
  border: 2px solid rgba(124, 58, 237, 0.35);
}

.sweet-popup-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-normal);
  line-height: 1.3;
  margin: 0;
}

.sweet-popup-body {
  width: 100%;
}

.sweet-popup-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.sweet-popup-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.sweet-btn {
  min-width: 104px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.sweet-btn:focus-visible {
  outline: 2px solid var(--text-accent);
  outline-offset: 2px;
}

.sweet-btn:active {
  transform: scale(0.97);
}

.sweet-btn-confirm {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}

.sweet-btn-confirm:hover {
  background: var(--accent-hover);
}

.sweet-btn-danger {
  background: var(--color-red);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

.sweet-btn-danger:hover {
  background: #dc2626;
}

.sweet-btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-normal);
  border: 1px solid var(--border-strong);
}

.sweet-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes sweetFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sweetFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes sweetPopIn {
  0% { opacity: 0; transform: scale(0.82) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sweetPopOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

@keyframes sweetIconPulse {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

