.google-calendar-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 20px 0;
  padding: 16px 17px;
  border: 1px solid #d8ddc9;
  border-radius: 16px;
  background: #f7f8ef;
}

.google-calendar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.google-calendar-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #dce1d0;
  border-radius: 12px;
  background: #fff;
  color: #4285f4;
  font-size: 19px;
  font-weight: 900;
}

.google-calendar-settings h3,
.google-calendar-settings p { margin: 0; }

.google-calendar-settings p {
  margin-top: 3px;
  color: #777e6c;
  font-size: 12px;
}

.google-calendar-actions { display: flex; gap: 7px; }
.google-calendar-actions button { padding: 9px 12px; }

.google-calendar-actions button:disabled,
.google-calendar-bulk button:disabled,
.google-calendar-refresh button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.google-calendar-auto-sync {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 2px 0 0;
  padding: 13px 14px;
  border: 1px solid #dde2d0;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.google-calendar-auto-sync input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: #707b50;
}

.google-calendar-auto-sync span { display: grid; gap: 3px; }

.google-calendar-auto-sync b,
.google-calendar-bulk b,
.google-calendar-refresh b {
  color: #34392d;
  font-size: 13px;
}

.google-calendar-auto-sync small,
.google-calendar-bulk small,
.google-calendar-refresh small {
  color: #858b79;
  font-size: 11px;
  line-height: 1.4;
}

.google-calendar-auto-sync:has(input:disabled) {
  cursor: not-allowed;
  opacity: .55;
}

.google-calendar-refresh,
.google-calendar-bulk {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #dde2d0;
  border-radius: 13px;
}

.google-calendar-refresh { background: #fff; }
.google-calendar-bulk { background: #eef1e3; }

.google-calendar-refresh > div,
.google-calendar-bulk > div {
  display: grid;
  gap: 3px;
}

.google-calendar-refresh button,
.google-calendar-bulk button {
  flex: 0 0 auto;
  padding: 9px 13px;
  white-space: nowrap;
}

.calendar-google-busy {
  margin: 7px 6px;
  padding: 8px 9px;
  border: 1px solid #c8ccc4;
  border-left: 4px solid #8c9188;
  border-radius: 10px;
  background: #eceeea;
  color: #555a53;
  box-shadow: 0 3px 8px #454a4314;
}

.calendar-google-busy b,
.calendar-google-busy span { display: block; }
.calendar-google-busy b { font-size: 11px; }
.calendar-google-busy span { margin-top: 2px; font-size: 10px; }
.month-dot.google-busy { background: #8c9188; }

.timeline-google-busy {
  position: absolute;
  top: var(--google-busy-offset, 4px);
  right: 7px;
  left: 7px;
  z-index: 3;
  height: var(--google-busy-height, 50px);
  box-sizing: border-box;
  overflow: hidden;
  padding: 6px;
  border: 1px solid #bfc4bb;
  border-left: 3px solid #81877e;
  border-radius: 7px;
  background: #dde0dbdb;
  color: #555a53;
  pointer-events: none;
}

.timeline-google-busy b,
.timeline-google-busy span { display: block; font-size: 9px; }
.timeline-google-busy span { margin-top: 2px; font-weight: 800; }

@media (max-width: 600px) {
  .google-calendar-settings { grid-template-columns: 1fr; }
  .google-calendar-actions { padding-left: 54px; }
  .google-calendar-actions button { flex: 1; }
  .google-calendar-refresh,
  .google-calendar-bulk { align-items: stretch; flex-direction: column; }
  .google-calendar-refresh button,
  .google-calendar-bulk button { width: 100%; }
  .timeline-google-busy {
    top: var(--google-busy-mobile-offset, 4px);
    height: var(--google-busy-mobile-height, 48px);
  }
}
.google-sync-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0;padding:12px 16px;border:1px solid #d9ddc7;border-radius:14px;background:#f2f5e8;color:#434d35;font-size:14px}
.google-sync-notice[hidden]{display:none}
.google-sync-notice[data-state="error"],.google-sync-notice[data-state="pending"]{background:#fff3df;border-color:#e3c083;color:#76531a}
.google-sync-notice button{flex-shrink:0;padding:8px 12px}
.google-legacy-dialog{width:min(720px,94vw);max-height:90vh;overflow:auto;padding:24px;border:1px solid #d8ddc9;border-radius:20px;background:#fffef7;color:#34392d}
.google-legacy-dialog::backdrop{background:#1b241777}
.google-legacy-dialog p{font-size:14px;line-height:1.5}
.google-legacy-dialog .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
.google-legacy-list{max-height:300px;overflow:auto;border:1px solid #d8ddc9;border-radius:12px}
.google-legacy-list:empty{display:none}
.google-legacy-list>div{display:flex;justify-content:space-between;gap:16px;padding:10px 14px;border-bottom:1px solid #e5e8da;font-size:13px}
.google-legacy-list>div:last-child{border-bottom:0}
.google-legacy-list span{white-space:nowrap}
@media(max-width:600px){.google-sync-notice{align-items:flex-start;flex-direction:column}}
