/* 复刻 https://bamboo.goodlesson.cn/feedback/cszyzx 的移动端样式 */

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

html,
body {
    margin: 0;
    padding: 0;
    background: #ededed;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font-family: inherit;
}

/* ---------- 原因选择页 ---------- */

.feedback-page {
    --fb-bg: #ededed;
    --fb-surface: #fff;
    --fb-text: #191919;
    --fb-muted: #888;
    --fb-border: #e5e5e5;
    --fb-notice: #739fcb;
    --fb-tap: #ececec;
    background: var(--fb-bg);
    min-height: 100dvh;
    color: var(--fb-text);
    -webkit-tap-highlight-color: transparent;
}

.feedback-header {
    background: var(--fb-bg);
    padding: 14px 16px 10px;
}

.feedback-header-text {
    color: var(--fb-muted);
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.feedback-list {
    background: var(--fb-surface);
    border-top: 1px solid var(--fb-border);
    border-bottom: 1px solid var(--fb-border);
    margin: 0;
    padding: 0;
    list-style: none;
}

.feedback-item {
    margin: 0;
}

.feedback-item + .feedback-item {
    border-top: 1px solid var(--fb-border);
}

.feedback-item-btn {
    background: var(--fb-surface);
    width: 100%;
    min-height: 50px;
    color: var(--fb-text);
    text-align: left;
    cursor: pointer;
    border: none;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.4;
    transition: background-color 0.15s;
    display: flex;
}

.feedback-item-btn:hover {
    background: #fafafa;
}

.feedback-item-btn:active {
    background: var(--fb-tap);
}

.feedback-item-label {
    flex: 1;
    min-width: 0;
}

.feedback-item-arrow {
    color: #c7c7cc;
    flex-shrink: 0;
}

.feedback-footer {
    background: var(--fb-bg);
    text-align: center;
    padding: 28px 16px 40px;
}

.feedback-notice-link {
    color: var(--fb-notice);
    cursor: pointer;
    background: 0 0;
    border: none;
    padding: 8px 12px;
    font-family: SimHei, "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.feedback-notice-link:active {
    opacity: 0.7;
}

/* ---------- 投诉表单页 ---------- */

.form-page {
    --form-bg: #ededed;
    --form-surface: #fff;
    --form-text: #191919;
    --form-muted: #888;
    --form-border: #e5e5e5;
    --form-primary: #07c160;
    background: var(--form-bg);
    min-height: 100dvh;
    color: var(--form-text);
}

.form-body {
    background: var(--form-surface);
}

.form-section {
    border-bottom: 1px solid var(--form-border);
    padding: 14px 16px;
}

.field-label {
    color: var(--form-text);
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
    display: block;
}

.field-input {
    width: 100%;
    color: var(--form-text);
    background: 0 0;
    border: none;
    outline: none;
    padding: 0;
    font-size: 16px;
    line-height: 1.5;
    display: block;
}

.field-input::placeholder {
    color: #c7c7cc;
}

.image-grid {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
    display: flex;
}

.image-item,
.image-add {
    border-radius: 2px;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    position: relative;
    overflow: hidden;
}

.image-thumb {
    object-fit: cover;
    background: #f2f2f2;
    width: 100%;
    height: 100%;
    display: block;
}

.image-remove {
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    position: absolute;
    top: 0;
    right: 0;
    padding: 0;
}

.image-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
}

.image-status.uploading {
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 2px;
    padding: 1px 4px;
    font-size: 10px;
}

.image-add {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: #ececec;
    border: none;
    justify-content: center;
    align-items: center;
    display: flex;
}

.image-file-input {
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    position: absolute;
    overflow: hidden;
}

.image-add-icon {
    color: #b2b2b2;
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
}

.content-section {
    padding-bottom: 32px;
    position: relative;
}

.content-input {
    resize: none;
    width: 100%;
    min-height: 100px;
    color: var(--form-text);
    background: 0 0;
    border: none;
    outline: none;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    display: block;
}

.content-input::placeholder {
    color: #c7c7cc;
}

.content-counter {
    color: var(--form-muted);
    font-size: 13px;
    position: absolute;
    bottom: 12px;
    right: 16px;
}

.form-error {
    color: #e54d42;
    background: var(--form-bg);
    margin: 0;
    padding: 10px 16px;
    font-size: 14px;
}

.form-footer {
    padding: 24px 16px calc(28px + env(safe-area-inset-bottom));
    background: var(--form-bg);
    justify-content: center;
    align-items: center;
    display: flex;
}

.submit-btn {
    background: var(--form-primary);
    color: #fff;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    width: 68%;
    max-width: 280px;
    min-height: 44px;
    font-size: 17px;
    font-weight: 600;
}

.submit-btn.is-loading,
.submit-btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

.submit-btn:not(:disabled):active {
    opacity: 0.85;
}

/* ---------- 提交成功页 ---------- */

.success-page {
    text-align: center;
    background: #ededed;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    padding: 24px 20px 40px;
    display: flex;
}

.success-card {
    width: 100%;
    max-width: 360px;
}

.success-icon {
    justify-content: center;
    margin-bottom: 20px;
    display: flex;
}

.success-title {
    color: #191919;
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 600;
}

.success-desc {
    color: #888;
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
}

/* ---------- 投诉须知页 ---------- */

.notice-page {
    --notice-bg: #fff;
    --notice-text: #191919;
    --notice-border: #e5e5e5;
    background: var(--notice-bg);
    min-height: 100dvh;
    color: var(--notice-text);
    -webkit-tap-highlight-color: transparent;
}

.notice-header {
    z-index: 10;
    border-bottom: 1px solid var(--notice-border);
    background: #f7f7f7;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 44px;
    padding: 0 8px;
    display: grid;
    position: sticky;
    top: 0;
}

.notice-back {
    color: #191919;
    cursor: pointer;
    background: 0 0;
    border: none;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    display: flex;
    padding: 0;
}

.notice-back:active {
    opacity: 0.6;
}

.notice-title {
    text-align: center;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 44px;
}

.notice-header-placeholder {
    width: 44px;
}

.notice-body {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

.notice-paragraph {
    color: #333;
    text-align: justify;
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.75;
}

.notice-paragraph:last-child {
    margin-bottom: 0;
}

/* ---------- 桌面端适配 ---------- */

@media (min-width: 768px) {
    .feedback-page {
        flex-direction: column;
        align-items: center;
        padding: 24px 16px 0;
        display: flex;
    }

    .feedback-header,
    .feedback-list,
    .feedback-footer {
        width: 100%;
        max-width: 480px;
    }

    .feedback-header {
        border-radius: 8px 8px 0 0;
    }

    .feedback-list {
        border-radius: 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    .feedback-footer {
        border-radius: 0 0 8px 8px;
    }

    .form-page {
        max-width: 480px;
        margin: 0 auto;
    }

    .success-page {
        background: #f5f5f5;
    }

    .notice-page {
        background: #ededed;
    }

    .notice-header {
        border-left: 1px solid var(--notice-border);
        border-right: 1px solid var(--notice-border);
        max-width: 680px;
        margin: 0 auto;
    }

    .notice-body {
        background: var(--notice-bg);
        border-left: 1px solid var(--notice-border);
        border-right: 1px solid var(--notice-border);
        padding: 20px 24px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feedback-item-btn {
        transition: none;
    }
}
