/* Light theme — only when enabled. Dark uses existing styles.css (unchanged). */

.masthead-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* —— Profile menu —— */
.profile-menu {
  position: relative;
  max-width: none !important;
  align-items: stretch !important;
  text-align: left !important;
  gap: 0 !important;
}

/* styles.css sets .account-block button { border: 0 } — override for profile pill */
.account-block.profile-menu .profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid #616a64;
  border-radius: 999px;
  background: #1a1e20;
  color: #e8ebe6;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  max-width: min(220px, 42vw);
  text-decoration: none;
  box-shadow: 0 0 0 1px #00000055 inset;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-block.profile-menu .profile-trigger:hover {
  background: #23282a;
  border-color: #787f7a;
  text-decoration: none;
}

.account-block.profile-menu .profile-trigger[aria-expanded="true"] {
  border-color: #9aaf7a;
  box-shadow: 0 0 0 1px #d4e89c44;
}

.profile-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #dce8c0;
  background: #2a302c;
  border: 1px solid #545c57;
  box-shadow: 0 0 0 1px #ffffff08 inset;
}

.profile-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.account-block.profile-menu .profile-trigger.is-signed-in .profile-icon {
  color: #e8f4c4;
  background: #323a34;
  border-color: #5e6b58;
}

.profile-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.profile-chevron {
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.account-block.profile-menu .profile-trigger[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
}

.profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 240;
  width: min(320px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid #383e3c;
  background: #1a1d1f;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: profile-panel-in 0.2s ease;
}

@keyframes profile-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-display-name {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.4px;
  color: #f2f4f0;
}

.profile-section-label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b9490;
}

.profile-org-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  max-height: 140px;
  overflow: auto;
  scrollbar-width: thin;
}

.profile-org-list li {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: #d8dcd6;
  background: #23272a;
  margin-bottom: 6px;
}

.profile-org-list li.is-active {
  background: #2d3328;
  color: #e8f4c4;
  box-shadow: inset 0 0 0 1px #d4e89c44;
}

.profile-org-list li.is-active::after {
  content: "Active";
  float: right;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b8d07a;
}

.profile-org-loading,
.profile-org-empty {
  background: transparent !important;
  color: #8b9490 !important;
  font-size: 12px !important;
  padding-left: 2px !important;
}

.profile-guest-copy {
  margin: 0 0 4px;
}

.profile-guest-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #a8b0ac;
}

.profile-panel-divider {
  height: 1px;
  margin: 14px 0;
  background: linear-gradient(90deg, transparent, #ffffff14, transparent);
}

.profile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #dce0db;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.profile-menu-item:hover {
  background: #272b2e;
  color: #f0f2ee;
}

.profile-theme-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #22262a;
}

.profile-theme-label {
  font-size: 12px;
  font-weight: 600;
  color: #a8b0ac;
}

.profile-sign-in-link {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  color: #253029 !important;
  background: linear-gradient(145deg, #e2f0a8, #c5db7a);
}

.profile-sign-in-link:hover {
  filter: brightness(1.05);
}

.profile-sign-in-link[hidden] {
  display: none !important;
}

/* Pill theme switch (reference: moon on right = dark) */
.theme-switch {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #121212;
  display: grid;
  place-items: center;
  color: #fff;
  transition: transform 0.24s cubic-bezier(0.22, 0.8, 0.22, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.theme-switch-icon {
  display: grid;
  place-items: center;
  line-height: 0;
}

.theme-switch-track > .theme-switch-sun {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #f0a830;
  opacity: 0.9;
  pointer-events: none;
}

html[data-theme="light"] .theme-switch-thumb {
  transform: translateX(0);
}

html:not([data-theme="light"]) .theme-switch-thumb {
  transform: translateX(26px);
}

html[data-theme="light"] .theme-switch-moon {
  display: none;
}

.theme-switch-sun-thumb {
  display: none;
}

html[data-theme="light"] .theme-switch-sun-thumb {
  display: grid;
}

html[data-theme="light"] .theme-switch-thumb {
  color: #f0a830;
}

html:not([data-theme="light"]) .theme-switch-track > .theme-switch-sun {
  opacity: 0.35;
}

/* —— Shared light page canvas (lobby + scheduler) —— */
html[data-theme="light"] {
  --together-page-bg: #f5f7f4;
}

/* —— Home lobby (not in meeting) —— */
html[data-theme="light"] body:not(.in-meeting) {
  background: var(--together-page-bg);
  color: #253029;
}

html[data-theme="light"] body:not(.in-meeting) .brand {
  color: #414a43;
  font-weight: 600;
}

html[data-theme="light"] body:not(.in-meeting) .brand-divider {
  background: #d9dfd8;
}

html[data-theme="light"] body:not(.in-meeting) .logo-on-dark {
  display: none;
}

html[data-theme="light"] body:not(.in-meeting) .logo-on-light {
  display: block;
  width: 118px;
  height: auto;
}

html[data-theme="light"] body:not(.in-meeting) .lobby-footer {
  color: #8a948b;
}

html[data-theme="light"] body:not(.in-meeting) .message {
  color: #527136;
}

html[data-theme="light"] .account-block.profile-menu .profile-trigger {
  background: #fafbf9;
  border-color: #d5dbd2;
  color: #2a3828;
  box-shadow: 0 0 0 1px #ffffff inset;
}

html[data-theme="light"] .account-block.profile-menu .profile-trigger:hover {
  background: #f3f6f1;
  border-color: #b8c4b0;
}

html[data-theme="light"] .account-block.profile-menu .profile-trigger[aria-expanded="true"] {
  border-color: #a8c48a;
  box-shadow: 0 0 0 1px #b8d07a55;
}

html[data-theme="light"] .profile-icon {
  color: #4a6240;
  background: #eef2ea;
  border-color: #c8d2c4;
}

html[data-theme="light"] .account-block.profile-menu .profile-trigger.is-signed-in .profile-icon {
  color: #3d5c30;
  background: #e4eadf;
  border-color: #9eaf8b;
}

html[data-theme="light"] .profile-panel {
  background: #ffffff;
  border-color: #e2e8de;
  box-shadow: 0 20px 44px rgba(52, 72, 48, 0.14);
}

html[data-theme="light"] .profile-display-name {
  color: #1a2418;
}

html[data-theme="light"] .profile-org-list li {
  background: #f3f6f1;
  color: #33432c;
}

html[data-theme="light"] .profile-org-list li.is-active {
  background: #e8f0dd;
  color: #2f4a1f;
  box-shadow: inset 0 0 0 1px #b8d07a66;
}

html[data-theme="light"] .profile-menu-item {
  color: #3d4a3a;
}

html[data-theme="light"] .profile-menu-item:hover {
  background: #eef2ea;
  color: #253029;
}

html[data-theme="light"] .profile-theme-row {
  background: #f3f6f1;
}

html[data-theme="light"] .profile-guest-copy p {
  color: #6f7a67;
}

html[data-theme="light"] .together-intro p {
  color: #6f7a67;
}

html[data-theme="light"] .together-intro h1 {
  color: #1a2418;
}

html[data-theme="light"] body:not(.in-meeting) .home-actions .quick-join {
  background: #f0f3ef !important;
}

html[data-theme="light"] body:not(.in-meeting) .quick-join input {
  color: #263626 !important;
}

html[data-theme="light"] body:not(.in-meeting) .quick-join input::placeholder {
  color: #7e887e !important;
}

html[data-theme="light"] body:not(.in-meeting) .quick-join:focus-within {
  box-shadow: 0 0 0 2px #9eaf8b;
}

html[data-theme="light"] body:not(.in-meeting) .quick-join button {
  background: #dbe4d3 !important;
  color: #385327 !important;
}

html[data-theme="light"] body:not(.in-meeting) .quick-join button:hover {
  background: #ccdabb !important;
}

html[data-theme="light"] a.sched-entry {
  color: #42622a;
}

html[data-theme="light"] a.sched-entry:hover {
  background: #eef2ea;
  color: #2f4a1f;
}

html[data-theme="light"] .calendar-heading h2 {
  color: #1a2418;
}

html[data-theme="light"] .calendar-heading button {
  color: #527736;
}

html[data-theme="light"] .calendar-row .week-day {
  color: #5c675a;
}

html[data-theme="light"] .calendar-row .week-day[aria-pressed="true"] {
  background: #e1edc8;
  color: #355821;
}

html[data-theme="light"] .calendar-row .week-day:hover {
  background: #f0f4e8;
}

html[data-theme="light"] .calendar-row .week-day[aria-pressed="true"]:hover {
  background: #d6e8b8;
}

html[data-theme="light"] .calendar-row .week-arrow {
  color: #76846d;
}

html[data-theme="light"] .conversation-row {
  background: #f5f7f4;
  border: 1px solid #e4e9df;
}

html[data-theme="light"] .conversation-row h3 {
  color: #1a2418;
}

html[data-theme="light"] .conversation-row p {
  color: #76816e;
}

html[data-theme="light"] .agenda-empty {
  background: #fafbf8 !important;
  border: 1px solid #e8ece4;
}

html[data-theme="light"] .agenda-empty p {
  color: #8a9384 !important;
}

html[data-theme="light"] body:not(.in-meeting) .secondary {
  background: #eef2ea;
  color: #33432c;
  border-color: #d5dccf;
}

/* —— Workspace scheduler —— */
html[data-theme="light"] body.gcal-page {
  background:
    radial-gradient(ellipse 90% 55% at 0% -20%, #e6efe0 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #eef2eb 0%, transparent 48%),
    var(--together-page-bg);
  color: #253029;
}

html[data-theme="light"] body.gcal-page .gcal-shell {
  background: transparent;
}

html[data-theme="light"] body.gcal-page .logo-on-dark {
  display: none;
}

html[data-theme="light"] body.gcal-page .logo-on-light {
  display: block;
  width: 118px;
  height: auto;
}

html[data-theme="light"] body.gcal-page .brand {
  color: #414a43;
}

html[data-theme="light"] body.gcal-page .brand-divider {
  background: #d9dfd8;
}

html[data-theme="light"] body.gcal-page .gcal-toolbar {
  border-bottom-color: transparent;
}

html[data-theme="light"] body.gcal-page .gcal-back {
  color: #6f7a67;
}

html[data-theme="light"] body.gcal-page .gcal-back:hover {
  color: #42622a;
}

html[data-theme="light"] body.gcal-page .gcal-nav button {
  background: #fafbf9;
  border-color: #d5dccf;
  color: #33432c;
}

html[data-theme="light"] body.gcal-page .gcal-back {
  background: #fafbf9;
  border-color: #d8dfd4;
  color: #5c675a;
}

html[data-theme="light"] body.gcal-page .gcal-back:hover {
  color: #2f4a1f;
  border-color: #a8c48a;
}

html[data-theme="light"] body.gcal-page .gcal-select {
  background: #fff;
  border-color: #d5dccf;
  color: #253029;
}

html[data-theme="light"] body.gcal-page .gcal-mini {
  background: transparent;
  border-color: transparent;
}

html[data-theme="light"] body.gcal-page .gcal-mini .mini-head {
  color: #33432c;
}

html[data-theme="light"] body.gcal-page .gcal-mini button {
  color: #5c675a;
}

html[data-theme="light"] body.gcal-page .gcal-field-label {
  color: #6f7a67;
}

html[data-theme="light"] body.gcal-page .gcal-main {
  background: #fff;
  border-color: #e0e4dc;
}

html[data-theme="light"] body.gcal-page .gcal-weekdays {
  background: #f5f7f4;
  border-bottom-color: #e8ece4;
}

html[data-theme="light"] body.gcal-page .gcal-weekdays span {
  color: #6f7a67;
}

html[data-theme="light"] body.gcal-page .gcal-grid .sched-day {
  background: #fff;
  border-color: #ebece8;
}

html[data-theme="light"] body.gcal-page .gcal-grid .sched-day:hover {
  background: #f5f7f4;
}

html[data-theme="light"] body.gcal-page .gcal-grid .sched-day.outside {
  background: #fafbf8;
  opacity: 0.7;
}

html[data-theme="light"] body.gcal-page .gcal-grid .sched-day-num {
  color: #33432c;
}

html[data-theme="light"] body.gcal-page .gcal-footer {
  color: #8a948b;
}

html[data-theme="light"] body.gcal-page .account-block a {
  color: #42622a;
}

html[data-theme="light"] body.gcal-page .account-block button {
  color: #6f7a67;
}

@media (max-width: 760px) {
  .masthead-tools { gap: 8px; }
  .account-block.profile-menu .profile-trigger { max-width: min(160px, 38vw); font-size: 12px; }
  .profile-panel { right: -8px; }
}

html[data-theme="light"] body.gcal-page .gcal-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 94px;
}

html[data-theme="light"] body.gcal-page .gcal-page-eyebrow {
  color: #6f7a67;
}

body.gcal-page .masthead-tools {
  margin-left: auto;
}
