/* Windows Mobile 6.1 "Today" screen.
   Design language: dark navy top title bar, sky-blue plugin backdrop,
   small Tahoma text (WM 6.1, NOT the ballooned 6.5 text), 1px borders,
   bottom soft-key strip. */

/* Overrides on top of css/reset.css — mobile uses tight Tahoma at 11px
   and a dark backing so the phone frame reads against the letterbox. */
html, body {
  font-family: "Tahoma", "Segoe UI", sans-serif;
  font-size: 11px;
  background: #1a2a3e;
  color: #000;
}

/* Phone frame. On desktop it centers as a 240x320 device;
   on a mobile viewport it fills the screen. */
#phone {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #0a1830;
}
/* Only render the phone-shell frame when the visitor is on a real
   pointer device (mouse) AND has room for it. A touch phone with a
   large CSS width — landscape, browser with tiny chrome — should
   still get the full-viewport view. */
@media (min-width: 480px) and (pointer: fine) and (hover: hover) {
  body {
    display: flex; align-items: center; justify-content: center;
    background:
      radial-gradient(ellipse at 50% 40%, #4a6a8a 0%, #1a2a3e 60%, #0a1424 100%);
  }
  #phone {
    position: relative; inset: auto;
    width: 320px; height: 480px;
    border: 10px solid #1c1c1c;
    border-radius: 22px;
    box-shadow:
      0 0 0 1px #000,
      0 24px 60px rgba(0,0,0,0.6),
      inset 0 0 0 1px #2a2a2a;
  }
}

/* ---------- Title bar (top status strip) ---------- */
.titlebar {
  flex: 0 0 26px;
  background: linear-gradient(180deg, #4b6a94 0%, #2c4a76 50%, #24406a 100%);
  color: #fff;
  display: flex; align-items: center;
  padding: 0 4px;
  gap: 4px;
  font-size: 11px;
  border-bottom: 1px solid #0e1e35;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset;
}
.titlebar .start {
  display: flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 6px;
  background: linear-gradient(180deg, #7db34a 0%, #4b8620 50%, #3a6d15 100%);
  border: 1px solid #1e3e08;
  color: #fff;
  font-size: 10px; font-weight: bold;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  border-radius: 2px;
  cursor: pointer;
}
.titlebar .start img { width: 12px; height: 12px; display: block; }
.titlebar .title {
  flex: 1;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}
.titlebar .icons {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px;
}
/* Little CSS pips for signal/bluetooth/battery — pure geometry, no images. */
.pip {
  display: inline-block;
  width: 14px; height: 14px;
  position: relative;
}
.pip.signal::before {
  content: "";
  position: absolute; left: 2px; bottom: 2px;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-bottom: 8px solid #fff;
}
.pip.bt {
  color: #7fbfff; font-weight: bold; font-size: 12px;
  text-align: center; line-height: 14px;
}
.pip.bt::before { content: "\1F5B7"; }
.pip.batt {
  border: 1px solid #fff; height: 8px; width: 14px;
  margin-top: 3px;
  position: relative; background: linear-gradient(90deg, #a9df6a 78%, transparent 78%);
}
.pip.batt::after {
  content: ""; position: absolute; right: -2px; top: 1px;
  width: 2px; height: 4px; background: #fff;
}
.titlebar .clock {
  padding-left: 4px;
  font-weight: bold;
}

/* ---------- Today screen body ---------- */
#today {
  flex: 1;
  background:
    /* soft haze on the wallpaper */
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.20) 100%),
    /* Aqua sky, classic WM6 "Windows Default" today wallpaper vibe */
    linear-gradient(180deg,
      #6ea9de 0%,
      #4c8bc9 30%,
      #325f9c 60%,
      #1e3e6f 100%);
  display: flex; flex-direction: column;
  overflow: auto;
  color: #fff;
}

/* Big Windows flag / branding block at the top of today, like the default */
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0));
}
.brand .logo {
  width: 40px; height: 40px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.brand .txt {
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
  line-height: 1.25;
}
.brand .txt small {
  display: block;
  font-size: 10px; opacity: 0.85;
}

/* Today plugin rows. Each is a compact strip with an icon and one line
   of secondary info. WM6.1 kept these lean; 6.5 blew them up. */
.plugin {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  min-height: 30px;
  border-bottom: 1px solid rgba(0,0,0,0.25);
  box-shadow: 0 1px 0 rgba(255,255,255,0.10);
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,0.45);
}
.plugin:active { background: rgba(0,0,0,0.15); }
.plugin img { width: 24px; height: 24px; display: block; flex: 0 0 24px; }
.plugin .lines { flex: 1; min-width: 0; line-height: 1.2; }
.plugin .primary { font-size: 12px; }
.plugin .secondary { font-size: 10px; opacity: 0.85; }
.plugin .chev { font-size: 12px; opacity: 0.8; padding-right: 2px; }

/* Date row (WM shows the date in a plain strip near the top) */
.today-date {
  padding: 3px 8px;
  font-size: 10px;
  background: rgba(0,0,0,0.20);
  border-bottom: 1px solid rgba(0,0,0,0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15);
}

/* ---------- Bottom soft-key bar ---------- */
.softkeys {
  flex: 0 0 26px;
  background: linear-gradient(180deg, #4b6a94 0%, #2c4a76 50%, #24406a 100%);
  border-top: 1px solid #0e1e35;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset;
  color: #fff; font-size: 11px;
  display: flex; align-items: stretch;
}
.softkey {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
  cursor: pointer;
}
.softkey + .softkey { border-left: 1px solid rgba(0,0,0,0.35); box-shadow: -1px 0 0 rgba(255,255,255,0.15); }
.softkey:active { background: rgba(0,0,0,0.20); }

/* ---------- App view (iframe wrapper shown when a plugin opens).
   Sits between the title bar (26px) and the soft keys (26px) so the
   "OK" key is always reachable to exit back to Today. */
#app {
  position: absolute;
  top: 26px; bottom: 26px; left: 0; right: 0;
  display: none;
  flex-direction: column;
  background: #fff;
  z-index: 5;
}
#app.open { display: flex; }
#app iframe {
  flex: 1;
  border: 0; width: 100%; background: #fff;
}
