/* modals.css — shared modal styles + auth modal */

/* ─── IMAGE PICKER ─── */
.image-picker { display: flex; flex-direction: column; gap: 10px; }
.image-picker-preview {
  height: 120px;
  border: 1px dashed var(--border-bright);
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 12px; color: var(--text-muted);
  letter-spacing: 0.05em;
}
.image-picker-preview.has-image { border-style: solid; }
.image-picker-actions { display: flex; gap: 10px; }
.image-picker-actions .btn { flex: 1; padding: 10px; font-size: 13px; }

/* ─── MODAL OVERLAY ─── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(31,30,29,0.85);
  z-index: 100;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

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

/* ─── MODAL ─── */
.modal {
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  padding: 36px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 22px; font-style: italic; font-weight: 300;
  color: var(--gold); margin-bottom: 24px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* ─── FORM ELEMENTS ─── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus { border-color: var(--gold); }

input[type="time"] { color-scheme: dark; }
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.info-box {
  padding: 12px 16px;
  background: rgba(217,119,87,0.08);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.info-box-title {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }

.icon-opt {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  transition: all 0.15s;
}

.icon-opt:hover, .icon-opt.selected { border-color: var(--gold); background: var(--glow); }

.modal-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ─── DELETE CONFIRM MODAL ─── */
.delete-confirm-modal .modal {
  width: min(400px, calc(100vw - 32px));
  padding: 32px;
}

.delete-confirm-modal .modal-title { color: var(--amber); }

.delete-confirm-text {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 24px;
}

.ritual-delete-name { color: var(--gold); font-weight: 600; }

/* ─── AUTH MODAL ─── */
.auth-modal-tabs {
  display: none;
}

.google-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: white;
  color: #444;
  border: 1px solid #ddd;
  font-family: 'Roboto', 'Space Mono', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.google-signin-btn:hover {
  background: #f8f8f8;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.google-icon { width: 20px; height: 20px; }

.auth-divider {
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

.auth-error {
  padding: 10px 12px;
  background: rgba(203,77,46,0.1);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.auth-error.show { display: block; }

/* ─── LOADING OVERLAY ─── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(31,30,29,0.9);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.loading-overlay.show { display: flex; }

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SYNC INDICATOR ─── */
.sync-indicator {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--bg2);
  border: 1px solid var(--border-bright);
  padding: 10px 16px;
  border-radius: 4px;
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 60;
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-ui);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sync-indicator.show { display: flex; }

.sync-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
