/* common.css — shared styles for The Relationship Intern */

/* ─── Reset ─────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ─── Base layout ────────────────────────────────────────── */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #0a0a0a;
  font-family: "Space Grotesk", sans-serif;
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ─── Gradient heading ───────────────────────────────────── */
h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, #00f0ff, #7b2ff7, #ff2d95, #00f0ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    gradient-shift 4s ease infinite,
    fade-in-up 1s ease-out both;
}

/* ─── Subtitle ───────────────────────────────────────────── */
.subtitle {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
  text-align: center;
  margin-top: -1rem;
  animation: fade-in-up 1s ease-out 0.2s both;
}

/* ─── Section label ──────────────────────────────────────── */
.section-label {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.8rem 2rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: scale(1.05);
}

.btn.primary {
  background: linear-gradient(135deg, #7b2ff7, #ff2d95);
}

.btn.primary:hover {
  box-shadow: 0 0 25px rgba(123, 47, 247, 0.5);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
}

.btn.secondary:hover {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn.danger {
  background: rgba(255, 45, 149, 0.15);
  color: #ff2d95;
}

.btn.danger:hover {
  background: rgba(255, 45, 149, 0.3);
  box-shadow: 0 0 20px rgba(255, 45, 149, 0.3);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-row {
  display: flex;
  gap: 1rem;
}

.back-row {
  animation: fade-in-up 1s ease-out 0.4s both;
}

/* ─── State messages ─────────────────────────────────────── */
.loading {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
}

.empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
  text-align: center;
  animation: fade-in-up 1s ease-out both;
}

.error-msg {
  color: rgba(255, 100, 100, 0.6);
  font-size: 0.8rem;
  padding: 0.5rem 0;
}

.status {
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.4em;
}

.status.error {
  color: #ff2d95;
}
.status.success {
  color: #00f0ff;
}

/* ─── Skeleton loaders ───────────────────────────────────── */
.skeleton-reminder {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.skeleton-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 55%;
}

/* ─── Reminder cards ─────────────────────────────────────── */
.reminders {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 90%;
  max-width: 420px;
  animation: fade-in-up 1s ease-out 0.5s both;
}

.reminders-title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.reminders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.save-all-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.save-all-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

.reminder-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: border-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

.reminder-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.reminder-card:hover .shop-hint {
  opacity: 1;
}

.shop-hint {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.reminder-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.reminder-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.reminder-icon.soon {
  background: rgba(255, 45, 149, 0.15);
}
.reminder-icon.upcoming {
  background: rgba(123, 47, 247, 0.15);
}
.reminder-icon.later {
  background: rgba(0, 240, 255, 0.1);
}

.reminder-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.reminder-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.reminder-date {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

.reminder-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.reminder-badge.soon {
  background: rgba(255, 45, 149, 0.15);
  color: #ff2d95;
}
.reminder-badge.upcoming {
  background: rgba(123, 47, 247, 0.15);
  color: #b07aff;
}
.reminder-badge.later {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
}

.reminder-actions {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-shrink: 0;
}

.reminder-hidden {
  display: none;
}

.reminder-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: center;
  transition: color 0.2s ease;
  width: 100%;
}

.reminder-toggle:hover {
  color: rgba(255, 255, 255, 0.6);
}

.calendar-popup {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.3rem;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.4rem 0;
  z-index: 10;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.calendar-option {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.calendar-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.reminders-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* ─── Notification bell / panel ──────────────────────────── */
.notif-bell-wrap {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 200;
}

.notif-bell {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease;
}

.notif-bell:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff2d55;
  color: #fff;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notif-panel {
  position: fixed;
  top: 4rem;
  right: 1.2rem;
  width: 340px;
  max-height: 70vh;
  overflow-y: auto;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-panel-title {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.notif-mark-read {
  background: none;
  border: none;
  color: #7b2ff7;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease;
}

.notif-mark-read:hover {
  color: #b07aff;
}

.notif-list {
  padding: 0.5rem 0;
}

.notif-item {
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
  border-left: 3px solid #7b2ff7;
}

.notif-item-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.notif-item-body {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.notif-item-time {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.7rem;
}

.notif-empty {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem 1rem;
}

@media (max-width: 480px) {
  .notif-panel {
    width: calc(100% - 2.4rem);
  }
}
