/* Trio Primêr Google Calendar — clean personnel-portal-aligned styling. */
html[data-trio-module="google-calendar"] {
  --ui-primary: #6d5ce7;
  --ui-primary-deep: #4036a9;
  --calendar-green: #22a35a;
}

html[data-trio-module="google-calendar"] body {
  background:
    radial-gradient(circle at 7% 5%, rgba(139, 92, 246, 0.14), transparent 30rem),
    radial-gradient(circle at 94% 10%, rgba(56, 189, 248, 0.13), transparent 28rem),
    linear-gradient(135deg, #f0edff, #f8faff 48%, #e7f3ff);
}

.events-section--standalone {
  width: calc(100% - 1.5rem);
  max-width: 50rem;
  margin: 1rem auto;
  padding: 1.2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(239, 237, 255, 0.84));
  box-shadow: 0 16px 42px rgba(69, 63, 145, 0.17), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  backdrop-filter: blur(28px) saturate(190%);
}

.calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(176, 168, 234, 0.58);
}

.calendar-kicker {
  margin: 0 0 0.2rem;
  color: #5746c9;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-title {
  margin: 0;
  background: linear-gradient(135deg, #6d28d9, #4f46e5, #168ac0);
  -webkit-background-clip: text;
  background-clip: text;
color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 1.7rem;
  font-weight: 850;
}

.calendar-subtitle {
  margin: 0.3rem 0 0;
  color: var(--ui-muted);
}

.events-list {
  display: grid;
  gap: 0.55rem;
}

.event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  padding: 0.7rem;
  border: 1px solid rgba(188, 181, 235, 0.62);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 20px rgba(65, 57, 145, 0.10), inset 0 1px 0 #fff;
}

.event-date {
  position: relative;
  display: inline-flex;
  width: auto;
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  place-items: center;
  padding: 0.38rem 0.68rem 0.38rem 1.05rem;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #8b7cf2, #6455de 52%, #493db4);
  box-shadow: 0 4px 0 #372e91, 0 9px 18px rgba(70, 57, 173, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-weight: 850;
  font-size: 0.82rem;
  line-height: 1.15;
  text-align: center;
}

.event-date::before {
  content: '';
  position: absolute;
  left: .55rem;
  width: .38rem;
  height: .38rem;
  border-radius: 50%;
  background: #5ee28d;
  box-shadow: 0 0 0 3px rgba(94,226,141,.18);
}

.event-title {
  margin: 0;
  color: #19394a;
  font-size: 1rem;
  font-weight: 820;
  line-height: 1.22;
  overflow-wrap: normal;
  word-break: normal;
}

.event-description {
  margin: 0.28rem 0 0;
  color: var(--ui-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.event-meta {
  margin: 0.22rem 0 0;
  color: var(--ui-muted);
}

.events-empty {
  padding: 2rem 1rem;
  border: 1px dashed rgba(153, 143, 222, 0.72);
  border-radius: 18px;
  color: #5147a1;
  background: rgba(244, 242, 255, 0.76);
  text-align: center;
}

@media (max-width: 560px) {
  .events-section--standalone {
    width: calc(100% - 0.75rem);
    margin: 0.4rem auto;
    padding: 0.55rem;
    border-radius: 20px;
  }

  .calendar-head {
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.55rem;
  }

  .calendar-title {
    font-size: 1.25rem;
  }

  .event {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.62rem;
    border-radius: 15px;
  }

  .event-date {
    width: auto;
    min-height: 2.15rem;
    justify-self: start;
    max-width: 100%;
    font-size: 0.78rem;
  }

  .event-title {
    font-size: 0.96rem;
  }
}
