/* ============================================================
   OS Simulator — Shared Component Styles
   ============================================================ */

/* ---------- Icon font ---------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---------- App background ---------- */
.bg-app {
  background-color: #EEECEA;
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #2e3132;
  border-radius: 9999px;
  padding: 3px;
  cursor: pointer;
  user-select: none;
  position: relative;
  width: 80px;
  height: 36px;
}
.lang-toggle .slider {
  position: absolute;
  width: 30px;
  height: 30px;
  background: #ffffff;
  border-radius: 50%;
  transition: left 0.25s ease;
  left: 3px;
  z-index: 0;
}
.lang-toggle[data-lang="en"] .slider {
  left: 47px; /* 80 - 3padding - 30slider = 47 */
}
.lang-toggle .label {
  width: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
  transition: color 0.25s ease;
  line-height: 30px;
}
.lang-toggle .label-zh              { color: #191c1d; }
.lang-toggle .label-en              { color: rgba(255,255,255,0.6); }
.lang-toggle[data-lang="en"] .label-zh { color: rgba(255,255,255,0.6); }
.lang-toggle[data-lang="en"] .label-en { color: #191c1d; }

/* ---------- Form inputs ---------- */
.input-field {
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid #d5d9d0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #191c1d;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input-field:focus {
  border-color: #3D6B35;
  box-shadow: 0 0 0 3px rgba(61, 107, 53, 0.12);
}
.input-field::placeholder {
  font-size: 14px;
  color: #aeb5a8;
  opacity: 1;
}

/* ---------- Custom checkbox ---------- */
.custom-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #c2c9bb;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.custom-checkbox:checked {
  background: #3D6B35;
  border-color: #3D6B35;
}
.custom-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1.5px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

/* ---------- Buttons ---------- */
.primary-btn {
  background: #3D6B35;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 0;
  border-radius: 8px;
  width: 100%;
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  letter-spacing: 0.02em;
}
.primary-btn:hover {
  background: #2D5228;
  box-shadow: 0 4px 16px rgba(61, 107, 53, 0.25);
}
.primary-btn:active {
  transform: scale(0.98);
}

.ghost-btn {
  background: #fff;
  color: #42493e;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 0;
  border-radius: 8px;
  width: 100%;
  border: 1.5px solid #d5d9d0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ghost-btn:hover {
  background: #f5f6f3;
  border-color: #b8bfb2;
}

/* ---------- Module badges ---------- */
.module-badge {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 28, 29, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 16px;
  animation: fadeIn 0.15s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal-card-lg { max-width: 580px; }   /* 多欄位 / cascade modal */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-title {
  font-size: 26px;
  font-weight: 800;
  color: #191c1d;
  letter-spacing: 0.05em;
}
.space-y-3 > * + * { margin-top: 12px; }

/* ---------- Surface card ---------- */
.surface-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.07);
}