/* Cloud sync UI styles matching edu.aubreyhan.net (#0f6e62 theme) */
.edu-sync-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(15, 110, 98, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f6e62;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.edu-sync-pill:hover {
  transform: translateY(-1px);
  border-color: #0f6e62;
  box-shadow: 0 8px 24px rgba(15, 110, 98, 0.18);
}

.edu-sync-pill[data-status="synced"] .edu-sync-dot {
  background: #16a34a;
}

.edu-sync-pill[data-status="syncing"] .edu-sync-dot {
  background: #d97706;
}

.edu-sync-pill[data-status="offline"] .edu-sync-dot,
.edu-sync-pill[data-status="error"] .edu-sync-dot {
  background: #dc2626;
}

.edu-sync-pill[data-status="local"] .edu-sync-dot {
  background: #64748b;
}

.edu-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f6e62;
  flex-shrink: 0;
}

.edu-sync-toast {
  position: fixed;
  right: 16px;
  bottom: 70px;
  z-index: 9991;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 12px;
  background: #0f6e62;
  color: #ffffff;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.edu-sync-toast button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #0f6e62;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.edu-sync-toast .edu-sync-toast-close {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 8px;
  font-size: 16px;
}

.edu-sync-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
}

.edu-sync-dialog {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.edu-sync-dialog h2 {
  margin: 0 0 8px;
  font-size: 19px;
  color: #0f172a;
}

.edu-sync-dialog p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.edu-sync-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.edu-sync-input-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 10px 64px 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 15px;
  color: #0f172a;
  background: #f8fafc;
  box-sizing: border-box;
}

.edu-sync-input-wrap input:focus {
  outline: none;
  border-color: #0f6e62;
  background: #ffffff;
}

.edu-sync-toggle-vis {
  position: absolute;
  right: 6px;
  min-height: 36px;
  padding: 4px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f6e62;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.edu-sync-error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13.5px;
  line-height: 1.45;
}

.edu-sync-notice {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  background: #f0fdfa;
  color: #115e59;
  font-size: 13.5px;
  line-height: 1.5;
}

.edu-sync-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edu-sync-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.edu-sync-btn:hover {
  background: #f8fafc;
}

.edu-sync-btn-primary {
  border-color: #0f6e62;
  background: #0f6e62;
  color: #ffffff;
}

.edu-sync-btn-primary:hover {
  background: #0b584e;
}

.edu-sync-btn-danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff5f5;
}

.edu-sync-btn-danger:hover {
  background: #fee2e2;
}

.edu-sync-btn-quiet {
  border-color: transparent;
  background: transparent;
  color: #64748b;
  font-weight: 500;
}

.edu-sync-meta-box {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #334155;
}

.edu-sync-meta-box code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}

@media print {
  .edu-sync-pill,
  .edu-sync-toast,
  .edu-sync-backdrop {
    display: none !important;
  }
}
