/**
 * Reset CSS - 企业门户网站常用重置样式
 * 统一不同浏览器的默认样式，提供一致的基础样式
 */

/* 1. 全局重置 */
@font-face {
    font-family: 'NotoSansTC';
    src: url('/fonts/NotoSansTC-Regular.ttf');
}
@font-face {
    font-family: 'NotoSansTC-Medium';
    src: url('/fonts/NotoSansTC-Medium.ttf');
}
* {
    font-family: 'NotoSansTC';
    margin: 0;
    padding: 0;
    line-height: 1.5;
    box-sizing: border-box;
}

/* 2. HTML和Body基础设置 */
html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 1440px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background-color: #fff;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    min-width: 1440px;
}

/* 3. 标题重置 */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    line-height: 1.2;
}

/* 4. 段落和引用 */
p {
    margin-bottom: 0;
}

blockquote {
    margin: 0;
    padding: 0;
    quotes: none;
}

blockquote:before,
blockquote:after {
    content: '';
}

/* 5. 列表样式 */
ul, ol {
    list-style: none;
}

dl {
    margin: 0;
}

dt {
    font-weight: bold;
}

dd {
    margin: 0;
}

/* 6. 链接样式 */
a {
    text-decoration: none;
    color: inherit;
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
}

a:active,
a:hover {
    outline-width: 0;
    outline: none;
}

/* 7. 表格样式 */
table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

th, td {
    padding: 0.5em;
    text-align: left;
    vertical-align: top;
}

/* 8. 表单元素 */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    outline: none;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
html [type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

button:focus{
    outline: none;
}

fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
    resize: vertical;
}

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

/* 9. 图片和媒体 */
img {
    border-style: none;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

svg:not(:root) {
    overflow: hidden;
}

audio,
canvas,
video {
    display: inline-block;
}

audio:not([controls]) {
    display: none;
    height: 0;
}

/* 10. 嵌入式内容 */
iframe {
    border: none;
}

/* 11. 辅助功能 */
[hidden] {
    display: none;
}

/* 12. 清除浮动 */
.clearfix::before,
.clearfix::after {
    content: '';
    display: table;
}

.clearfix::after {
    clear: both;
}

/* 13. 选择文本样式 */
::selection {
    background-color: #DD2226;
    color: #fff;
}

/* 14. 焦点样式 */
:focus {
    outline: 2px solid #DD2226;
    outline-offset: 2px;
}

/* 15. 禁用样式 */
[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 16. 打印样式 */
@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
    }

    abbr[title]::after {
        content: ' (' attr(title) ')';
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
