/* =============================================================
   KALENDER-SYNCHRONISATION STYLES
   Nalva v0.6.4 – Calendar Sync Settings Panel
   ============================================================= */

/* ── Provider Grid ─────────────────────────────────────────── */
.cal-provider-grid {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.cal-provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  transition: border-color .2s, box-shadow .2s;
}
.cal-provider-card:hover {
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 0 0 3px rgba(99,102,241,.07);
}

.cal-provider-card-header {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
}

.cal-provider-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.cal-logo-google { background: rgba(66,133,244,.12); }
.cal-logo-outlook { background: rgba(0,120,212,.12); }

.cal-provider-info { flex: 1; min-width: 0; }
.cal-provider-name {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-provider-status {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: var(--text-muted);
}

/* ── Status Dots ────────────────────────────────────────────── */
.cal-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.cal-status-disconnected { background: #6b7280; }
.cal-status-connected {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: cal-pulse 2s ease-in-out infinite;
}
.cal-status-syncing {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: cal-pulse 1s ease-in-out infinite;
}
.cal-status-error {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

@keyframes cal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ── Priority Chips ─────────────────────────────────────────── */
.cal-prio-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  padding: .3rem .7rem;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  font-size: .8rem;
  color: var(--text-secondary);
  transition: all .15s;
  user-select: none;
}
.cal-prio-chip input { display: none; }
.cal-prio-chip:has(input:checked) {
  background: rgba(99,102,241,.18);
  border-color: rgba(99,102,241,.5);
  color: #a5b4fc;
  font-weight: 600;
}
.cal-prio-chip:hover {
  border-color: rgba(99,102,241,.4);
}

/* ── Recurrence End Options ─────────────────────────────────── */
.cal-recurrence-end-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .83rem;
  color: var(--text-secondary);
  padding: .3rem 0;
  flex-wrap: wrap;
}
.cal-recurrence-end-option input[type="radio"] {
  accent-color: #6366f1;
  flex-shrink: 0;
}
.cal-recurrence-end-option input[type="date"],
.cal-recurrence-end-option input[type="number"] {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  padding: .25rem .5rem;
  font-size: .82rem;
}

/* ── iCal Feed URL Modal ────────────────────────────────────── */
.cal-feed-url-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(16,185,129,.35);
  border-radius: 10px;
  padding: .5rem .75rem;
  margin-top: .65rem;
}
.cal-feed-url-box input {
  flex: 1;
  border: none;
  background: transparent;
  color: #10b981;
  font-family: monospace;
  font-size: .8rem;
  outline: none;
}
.cal-feed-url-box button {
  flex-shrink: 0;
  font-size: .75rem;
  padding: .3rem .6rem;
}

/* ── Sync Activity Log Strip ───────────────────────────────── */
.cal-sync-log-entry {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .75rem;
  color: var(--text-muted);
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  line-height: 1.4;
}
.cal-sync-log-entry:last-child { border-bottom: none; }
.cal-sync-log-icon { flex-shrink: 0; font-size: .9rem; }
.cal-sync-log-time { color: var(--text-muted); font-size: .72rem; margin-left: auto; white-space: nowrap; }

/* ── Connect Button State ────────────────────────────────────── */
.cal-connect-btn { min-width: 90px; justify-content: center; }
.cal-connect-btn.is-connected {
  background: rgba(16,185,129,.15) !important;
  border-color: rgba(16,185,129,.4) !important;
  color: #10b981 !important;
}
