/* ═══════════════════════════════════════════════════════════════════════════
   Aero Mode — Chrome / Component Styles
   Windows Vista/7 Aero glass — 7.css handles window chrome
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  height: 100dvh; /* Dynamic viewport height for mobile browsers */
  overflow: hidden;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #3399ff;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7.CSS OVERRIDES — Reset aggressive button styles on non-window elements
   7.css applies gradient ::before/::after overlays, min-sizing, and
   pulse animation to ALL <button> elements. Neutralise on our buttons.
   ═══════════════════════════════════════════════════════════════════════════ */

.aero-start-orb,
.taskbar-btn,
.start-menu-item,
.context-menu-item,
.aero-btn {
  min-width: 0;
  min-height: 0;
  animation: none;
}

/* Kill 7.css ::before/::after gradient overlay pseudo-elements */
.aero-start-orb::before,
.aero-start-orb::after,
.taskbar-btn::before,
.taskbar-btn::after,
.start-menu-item::before,
.start-menu-item::after,
.context-menu-item::before,
.context-menu-item::after,
.aero-btn::before,
.aero-btn::after {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   WINDOW — 7.css handles glass frame, title bar, controls, and menu bar
   We add icon styling and layout overrides
   ═══════════════════════════════════════════════════════════════════════════ */

/* Title bar icon (not part of 7.css) */
.title-bar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 4px;
}

/* Windows 7 titles are left-aligned */
.title-bar-text {
  text-align: left;
}

/* Ensure window body fills flex container and overrides 7.css margin */
.window-body {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #fff;
  margin: 0;
}

.window-body .text-content {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #222;
}

/* ── Folder view ─────────────────────────────────────────────────────── */

.folder-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 4px;
  padding: 12px;
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
}

.folder-item:hover {
  background: rgba(51, 153, 255, 0.12);
}

.folder-item img {
  width: 48px;
  height: 48px;
}

.folder-item span {
  font-size: 11px;
  color: #222;
  word-break: break-word;
  line-height: 1.2;
}

/* ── Print bar ────────────────────────────────────────────────────────── */

.print-bar {
  padding: 6px 8px;
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

.aero-btn {
  padding: 4px 16px;
  font-family: inherit;
  font-size: 12px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: linear-gradient(to bottom, #f6f6f6, #e9e9e9);
  cursor: pointer;
  color: #222;
  min-width: 0;
}

.aero-btn:hover {
  background: linear-gradient(to bottom, #edf5fc, #d4e8f8);
  border-color: #7eb4ea;
}

.aero-btn:active {
  background: linear-gradient(to bottom, #c4ddee, #b8d4e8);
}

/* ── Resize grip ─────────────────────────────────────────────────────── */

.window-resize-grip {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 10;
}

.window-resize-grip::after {
  content: '';
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  background:
    linear-gradient(135deg,
      transparent 33%,
      rgba(0, 0, 0, 0.2) 33%,
      rgba(0, 0, 0, 0.2) 40%,
      transparent 40%,
      transparent 60%,
      rgba(0, 0, 0, 0.2) 60%,
      rgba(0, 0, 0, 0.2) 67%,
      transparent 67%
    );
}

/* ── Focus overlay ───────────────────────────────────────────────────── */

.window-focus-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* ── Scrollbar ────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* ── Context menu ─────────────────────────────────────────────────────── */

.context-menu {
  position: fixed;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  min-width: 160px;
  padding: 4px 0;
  z-index: 9999;
}

.context-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 24px 5px 12px;
  font-family: inherit;
  font-size: 12px;
  border: none;
  background: none;
  cursor: pointer;
  color: #222;
}

.context-menu-item:hover {
  background: #3399ff;
  color: #fff;
}

.context-menu-divider {
  height: 1px;
  margin: 4px 8px;
  background: #e0e0e0;
}

/* -- Contact form -------------------------------------------------------- */

.contact-form { padding: 16px 20px; }
.contact-field { margin-bottom: 12px; }
.contact-field label { display: block; font-size: 12px; color: #555; margin-bottom: 3px; }
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 6px 10px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 13px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #fff;
}
.contact-field input:focus,
.contact-field textarea:focus { outline: none; border-color: #4a90d9; box-shadow: 0 0 0 2px rgba(74,144,217,0.2); }
.contact-field textarea { resize: vertical; min-height: 90px; }
.contact-submit {
  padding: 6px 20px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: linear-gradient(to bottom, #f0f0f0, #ddd);
  cursor: pointer;
}
.contact-submit:hover { background: linear-gradient(to bottom, #e8e8e8, #ccc); }
.contact-status { margin-top: 10px; font-size: 12px; }
.contact-status.success { color: #2a7e2a; }
.contact-status.error { color: #c00; }
.contact-form .g-recaptcha { margin: 12px 0; }
