/*
Theme Name: 外卖抽屉
Theme URI: https://www.e-77.cn
Author: FXX
Description: 按「外卖抽屉」小程序 1:1 移植的移动端 WordPress 主题，包含首页查券、抽屉工具、商家券结果与神券汇总。
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: waimai-drawer
*/

:root {
    --wmd-bg: #f0f2f5;
    --wmd-card: #ffffff;
    --wmd-text: #1a1a2e;
    --wmd-text2: #5a5a72;
    --wmd-text3: #9a9ab0;
    --wmd-line: #f0f0f0;
    --wmd-primary: #ff6b35;
    --wmd-primary-2: #ff8e53;
    --wmd-green: #07c160;
    --wmd-radius: 16px;
    --wmd-radius-sm: 12px;
    --wmd-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    --wmd-gap: 12px;
    --wmd-inset: 12px;
    --wmd-tabbar: 56px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: #e9ebef;
    color: var(--wmd-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.app-shell {
    position: relative;
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--wmd-bg);
    padding-bottom: calc(var(--wmd-tabbar) + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

@media (min-width: 600px) {
    .app-shell {
        box-shadow: 0 0 40px rgba(20, 24, 31, .12);
    }
}

/* 底栏 */
.app-tabbar {
    position: fixed;
    z-index: 90;
    left: 50%;
    bottom: 0;
    width: 100%;
    max-width: 430px;
    transform: translateX(-50%);
    display: flex;
    background: #fff;
    border-top: 1px solid #f2f2f2;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.app-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: var(--wmd-tabbar);
    color: var(--wmd-text3);
    font-size: 10.5px;
}

.app-tabbar__item img {
    width: 21px;
    height: 21px;
}

.app-tabbar__item.is-active {
    color: var(--wmd-primary);
}

/* 通用按钮/输入 */
.wmd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    cursor: pointer;
}

.wmd-btn--primary {
    background: linear-gradient(90deg, #ff6b35, #ff8c00);
    color: #fff;
    font-weight: 600;
}

.wmd-btn--outline {
    background: #fff;
    border: 1.5px solid var(--wmd-primary);
    color: var(--wmd-primary);
    font-weight: 600;
}

/* 轻提示 */
.wmd-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--wmd-tabbar) + 18px);
    z-index: 999;
    max-width: 80vw;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity .2s ease, transform .2s ease;
}

.wmd-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 空态 */
.wmd-empty {
    padding: 34px 16px;
    color: var(--wmd-text3);
    font-size: 13px;
    text-align: center;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
