/* Shared UI components */

.notif {
  position: fixed;
  top: 86px;
  right: 24px;
  background: var(--surface-2, #1a1f2f);
  color: var(--text, #f4f6ff);
  border: 1px solid var(--border, rgba(255,255,255,0.18));
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}

.notif.show {
  transform: translateY(0);
  opacity: 1;
}

.notif.notif-success {
  background: rgba(37, 120, 70, 0.95);
  border-color: rgba(97, 236, 160, 0.55);
  color: #ecfff5;
}

.notif.notif-error {
  background: rgba(132, 40, 40, 0.95);
  border-color: rgba(255, 131, 131, 0.6);
  color: #fff1f1;
}

.notif.notif-info {
  background: rgba(39, 72, 126, 0.95);
  border-color: rgba(130, 181, 255, 0.6);
  color: #eef5ff;
}

.action-btns {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

tr:hover .action-btns,
.session-row:hover .action-btns {
  opacity: 1;
}

.action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.action-btn.action-btn-text {
  width: auto;
  min-width: 26px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
}

.action-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.action-btn.del:hover {
  border-color: var(--accent3);
  color: var(--accent3);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-right: 24px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-bg2);
  z-index: 600;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.open {
  display: flex;
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--confirm-border);
  border-radius: 24px;
  padding: 24px;
  max-width: 380px;
  text-align: center;
  animation: modalIn 0.15s ease;
}

.confirm-box p {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.confirm-box strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

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

.btn-danger {
  background: var(--accent3);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.1);
}

[data-theme="light"] .modal,
[data-theme="light"] .confirm-box {
  box-shadow: var(--shadow);
}
