/* Phone HUD glance widgets — weather, calendar, YouTube */

.widget-strip {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  flex-wrap: wrap;
  z-index: 90;
}

.widget-chip {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 48%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(66, 232, 255, 0.28);
  background: rgba(6, 16, 28, 0.88);
  color: var(--fg, #e8f4ff);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(66, 232, 255, 0.08);
}

.widget-chip small {
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted, #7a8fa3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.widget-chip:active {
  transform: scale(0.98);
}

.widget-panel {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(4px);
}

.widget-panel.hidden {
  display: none;
}

.widget-panel-inner {
  width: min(100%, 420px);
  max-height: min(88vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(66, 232, 255, 0.35);
  background: linear-gradient(165deg, rgba(8, 18, 32, 0.98), rgba(4, 10, 18, 0.98));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(66, 232, 255, 0.12);
}

.widget-panel-inner.floating-panel {
  position: fixed;
  width: min(calc(100vw - 16px), 420px);
  max-height: min(88vh, 640px);
}

.widget-drag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: grab;
  touch-action: none;
  border-bottom: 1px solid rgba(66, 232, 255, 0.15);
}

.widget-drag:active {
  cursor: grabbing;
}

.widget-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ee8fa;
}

.widget-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 68, 102, 0.15);
  color: #ff8899;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.widget-body {
  padding: 14px 14px 16px;
  overflow-y: auto;
}

.widget-weather-main {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e8f4ff;
  margin: 0 0 4px;
}

.widget-weather-sub {
  font-size: 0.82rem;
  color: var(--muted, #7a8fa3);
  margin: 0 0 12px;
}

.widget-weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.widget-stat {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(66, 232, 255, 0.06);
  border: 1px solid rgba(66, 232, 255, 0.12);
  font-size: 0.72rem;
}

.widget-stat strong {
  display: block;
  font-size: 0.95rem;
  color: #c8f0ff;
}

.widget-time-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(66, 232, 255, 0.12);
}

.widget-time-row .clock {
  font-size: 1.4rem;
  font-weight: 700;
  color: #7ee8fa;
}

.widget-time-row .tz {
  font-size: 0.65rem;
  color: var(--muted, #7a8fa3);
}

.widget-event {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.widget-event:last-child {
  border-bottom: none;
}

.widget-event-time {
  font-size: 0.62rem;
  color: #7ee8fa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget-event-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 2px;
}

.widget-empty {
  font-size: 0.78rem;
  color: var(--muted, #7a8fa3);
  padding: 8px 0;
}

.widget-add-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(66, 232, 255, 0.12);
}

.widget-add-form input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(66, 232, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font-size: 0.82rem;
}

.widget-add-form button {
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: rgba(66, 232, 255, 0.22);
  color: #e8f4ff;
  font-weight: 700;
  cursor: pointer;
}

.widget-youtube-stage {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.widget-youtube-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.widget-youtube-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  flex-wrap: wrap;
}

.widget-youtube-toolbar a,
.widget-youtube-toolbar button {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(66, 232, 255, 0.25);
  background: rgba(66, 232, 255, 0.1);
  color: #7ee8fa;
}

.widget-youtube-title {
  padding: 0 14px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.line.link .link-play {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(66, 232, 255, 0.35);
  background: rgba(66, 232, 255, 0.12);
  color: #7ee8fa;
  font-size: 0.68rem;
  cursor: pointer;
}
