﻿/* ============================================================
   Trip Share - CSS Reset / Normalize
   最小化浏览器默认样式差异，保证跨浏览器一致性
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === 语义化元素 === */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, nav, section {
  display: block;
}

/* === 链接 === */
a {
  color: var(--color-primary);
  text-decoration: none;
  -webkit-touch-callout: none;
}
a:active {
  opacity: 0.7;
}

/* === 图片 === */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}

/* === 表单元素 === */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
button:disabled {
  cursor: not-allowed;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* 搜索框清除按钮隐藏 */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* 数字输入框去掉箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* === 列表 === */
ul, ol {
  list-style: none;
}

/* === 表格 === */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* === 引用 === */
blockquote, q {
  quotes: none;
}

/* === 隐藏元素 === */
[hidden] {
  display: none !important;
}

/* === 无障碍：减少动画 === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
