.google-calendar-panel { margin-top: 22px; margin-bottom: 22px; }
.google-calendar-heading { align-items: flex-start; }
.google-calendar-heading h2 { font-size: 21px; }
.google-calendar-heading .panel-subtitle { max-width: 380px; line-height: 1.6; }
.google-readonly-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 7px 9px; white-space: nowrap; margin-top: 1px; }
.google-readonly-badge .icon { width: 12px; height: 12px; }
.google-calendar-body { display: grid; gap: 18px; }
.google-calendar-notice { font-size: 11px; line-height: 1.75; color: var(--muted); }
.google-calendar-error { color: #a44539; font-size: 11px; line-height: 1.7; padding: 12px 14px; border: 1px solid #a4453933; border-radius: 10px; background: #a4453908; overflow-wrap: anywhere; }
.google-connections-grid { display: grid; gap: 18px; }
.google-connection-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.google-account-heading, .google-account-option { display: flex; align-items: center; gap: 11px; }
.google-account-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; background: var(--green-light); color: var(--green); flex-shrink: 0; }
.google-account-icon .icon { width: 18px; height: 18px; }
.google-account-copy { min-width: 0; flex: 1; }
.google-account-copy h3 { font-size: 11px; line-height: 1.5; font-weight: 650; }
.google-account-copy p { font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 2px; overflow-wrap: anywhere; }
.google-connection-state { color: var(--green); font-size: 9px; font-weight: 550; white-space: nowrap; }
.google-connection-state.needs-attention { color: var(--orange); }
.google-connection-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 9px; color: var(--muted); margin: 17px 0; }
.google-selection-form { display: grid; gap: 14px; }
.google-calendar-fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.google-calendar-fieldset legend { font-size: 10px; font-weight: 650; margin-bottom: 9px; padding: 0; }
.google-calendar-choice { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin-top: 6px; cursor: pointer; transition: border-color .18s, background-color .18s; }
.google-calendar-choice:hover { border-color: var(--green); }
.google-calendar-choice:has(input:checked) { background: var(--green-light); border-color: color-mix(in srgb, var(--green), transparent 55%); }
.google-calendar-choice:has(input:disabled) { cursor: default; }
.google-calendar-choice input, .google-share-confirm input { width: 16px; height: 16px; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.google-calendar-choice-copy { display: grid; gap: 3px; min-width: 0; }
.google-calendar-choice-copy strong { font-size: 11px; font-weight: 550; overflow-wrap: anywhere; }
.google-calendar-choice-copy small { font-size: 8px; color: var(--muted); }
.calendar-source-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--calendar-color, #607caa); flex-shrink: 0; }
.google-share-confirm { display: flex; align-items: flex-start; gap: 9px; font-size: 10px; line-height: 1.7; color: var(--muted); cursor: pointer; padding: 3px 0; }
.google-share-confirm input { margin-top: 2px; }
.google-selection-actions { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.google-selection-actions .btn { min-height: 40px; }
.google-selection-actions .text-link, .google-connection-actions .text-link, .google-another-account { min-height: 44px; }
.google-connection-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--line); }
.google-disconnect { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 9px; padding: 4px 0; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.google-disconnect:hover { color: var(--orange); text-decoration-color: currentColor; }
.google-calendar-panel button:disabled { cursor: default; }
.google-account-options { display: grid; gap: 0; }
.google-account-option { padding: 13px 0; border-top: 1px solid var(--line); }
.google-account-option:last-child { padding-bottom: 0; }
.google-account-option .btn { min-height: 44px; font-size: 10px; padding-inline: 13px; }
.google-option-state { font-size: 9px; color: var(--muted); white-space: nowrap; }
.google-sharing-help { display: flex; align-items: flex-start; gap: 9px; padding: 13px 14px; background: var(--paper); border-radius: 10px; }
.google-sharing-help .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.google-sharing-help p { font-size: 10px; line-height: 1.8; color: var(--muted); }
.google-inline-help { font-size: 10px; color: var(--muted); line-height: 1.75; }
.google-connection-card > .google-inline-help { margin: 12px 0; }
.google-calendar-readonly-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.google-calendar-readonly-list li { display: flex; align-items: center; gap: 8px; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.calendar-source-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin: 0 0 19px; }
.calendar-source-list { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.calendar-source-filter { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 100px; background: var(--card); padding: 8px 11px; font-size: 9px; min-height: 38px; max-width: 240px; color: var(--muted); transition: background-color .18s, border-color .18s; }
.calendar-source-filter > span:not(.calendar-source-dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-source-filter .icon { width: 11px; height: 11px; }
.calendar-source-filter[aria-pressed="true"] { color: var(--ink); background: var(--green-light); border-color: color-mix(in srgb, var(--green), transparent 65%); }
.calendar-source-filter[aria-pressed="false"] .calendar-source-dot { opacity: .35; }
.calendar-source-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.calendar-source-actions .text-link { min-height: 38px; white-space: nowrap; }
.calendar-sync-progress { font-size: 9px; color: var(--muted); line-height: 38px; }
.google-calendar-event { border-left: 3px solid var(--calendar-color, #607caa); background: color-mix(in srgb, var(--calendar-color, #607caa) 12%, var(--card)); color: var(--ink); padding-left: 5px; }
.google-calendar-event:hover { background: color-mix(in srgb, var(--calendar-color, #607caa) 22%, var(--card)); }
.google-event-row { width: 100%; text-align: left; background: transparent; border-width: 0 0 1px; border-style: solid; border-color: var(--line); border-radius: 0; color: var(--ink); }
.google-event-row:hover .event-details > strong { color: var(--green); }
.google-event-row .event-details { flex: 1; min-width: 0; }
.google-event-row .event-details > strong { overflow-wrap: anywhere; }
.google-event-row .event-details > small { display: block; line-height: 1.7; overflow-wrap: anywhere; }
.google-event-origin { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 8px; color: var(--muted); line-height: 1.6; margin-top: 5px; }
.google-event-origin .calendar-source-dot { height: 6px; width: 6px; }
.google-origin-label { font-size: 7px; font-weight: 550; text-transform: uppercase; letter-spacing: .3px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; margin-left: 2px; }
.google-row-open { color: var(--muted); }
.google-row-open .icon { width: 16px; height: 16px; }
.google-event-detail { padding: 24px 27px 27px; }
.google-detail-source { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.google-event-detail > h3 { font-size: 23px; font-weight: 600; letter-spacing: -.6px; line-height: 1.4; margin: 9px 0 21px; overflow-wrap: anywhere; }
.google-event-detail dl { margin: 0; display: grid; gap: 15px; }
.google-event-detail dl > div { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 10px; }
.google-event-detail dt { font-size: 10px; color: var(--muted); line-height: 1.8; }
.google-event-detail dd { font-size: 11px; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.google-event-detail dd small { display: block; font-size: 8px; color: var(--muted); margin-top: 3px; }
.google-event-description { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.google-event-description h4 { font-size: 10px; font-weight: 550; margin: 0 0 8px; }
.google-event-description p { font-size: 11px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.google-event-readonly { display: flex; align-items: flex-start; gap: 8px; font-size: 9px; line-height: 1.75; color: var(--muted); margin-top: 22px; }
.google-event-readonly .icon { width: 13px; height: 13px; margin-top: 2px; }
.google-event-open { margin-top: 20px; min-height: 44px; max-width: 100%; white-space: normal; text-align: center; }
[data-theme="dark"] .google-calendar-error { color: #edb6a8; border-color: #c984734d; background: #c984730a; }
@media (max-width: 960px) {
  .calendar-source-toolbar { flex-direction: column; gap: 6px; }
  .calendar-source-actions { align-self: flex-end; }
}
@media (max-width: 720px) {
  .google-calendar-panel { margin-top: 18px; }
  .google-calendar-heading { gap: 8px; }
  .google-calendar-heading h2 { font-size: 19px; }
  .google-calendar-heading .panel-subtitle { font-size: 9px; }
  .google-readonly-badge { font-size: 8px; padding: 6px 8px; }
  .google-readonly-badge .icon { width: 10px; height: 10px; }
  .google-calendar-body { gap: 16px; }
  .google-calendar-notice { font-size: 10px; }
  .google-connection-card { padding: 15px 13px; }
  .google-account-heading { gap: 8px; flex-wrap: wrap; }
  .google-account-heading .google-account-copy { flex-basis: calc(100% - 45px); }
  .google-connection-state { margin-left: 45px; margin-top: -3px; }
  .google-account-option { gap: 8px; }
  .google-account-icon { width: 32px; height: 32px; border-radius: 9px; }
  .google-account-icon .icon { width: 16px; height: 16px; }
  .google-account-option .btn { padding-inline: 10px; gap: 5px; font-size: 9px; }
  .google-account-option .btn .icon { width: 13px; height: 13px; }
  .google-account-copy h3 { font-size: 10px; }
  .google-account-copy p { font-size: 9px; }
  .google-share-confirm { font-size: 9px; min-height: 44px; }
  .google-calendar-choice { min-height: 54px; padding: 10px 8px; gap: 8px; }
  .google-selection-actions { gap: 4px 12px; }
  .google-selection-actions .btn { min-height: 44px; font-size: 10px; }
  .google-selection-actions .text-link { font-size: 9px; }
  .google-sharing-help { padding: 12px; }
  .google-sharing-help p { font-size: 9px; }
  .calendar-source-toolbar { margin-bottom: 16px; gap: 4px; }
  .calendar-source-filter { min-height: 44px; padding: 9px 11px; font-size: 9px; max-width: 190px; }
  .calendar-source-actions { align-self: auto; justify-content: space-between; width: 100%; }
  .calendar-source-actions .text-link { min-height: 44px; font-size: 10px; }
  .google-event-origin { font-size: 9px; }
  .google-event-row .event-details > small { font-size: 10px; }
  .google-event-detail { padding: 21px; }
  .google-event-detail > h3 { font-size: 22px; }
  .google-event-detail dl > div { grid-template-columns: 68px minmax(0,1fr); gap: 9px; }
}
@media (max-width: 360px) {
  .google-calendar-heading { flex-wrap: wrap; }
  .google-readonly-badge { margin-top: 0; }
  .google-account-option .google-account-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .google-calendar-choice, .calendar-source-filter { transition: none; }
}
