/* =========================================
   覆盖 global.css 的 image_addon 布局
   ========================================= */
.image_addon {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0;
}

/* =========================================
   通用 item
   ========================================= */
.image_addon .image_item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: visible;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}

.image_addon .image_item:active {
    transform: scale(0.93);
}

/* 入场动画 */
.image_addon .image_item.new_item {
    animation: mediaIn 0.28s ease forwards;
}

@keyframes mediaIn {
    from { opacity: 0; transform: scale(0.72); }
    to   { opacity: 1; transform: scale(1); }
}

/* 出场动画 */
.image_addon .image_item.removing {
    animation: mediaOut 0.2s ease forwards;
    pointer-events: none;
}

@keyframes mediaOut {
    to { opacity: 0; transform: scale(0.65); }
}

/* =========================================
   拍照按钮 — 配合主题橙色风格
   ========================================= */
.image_addon .image_item.addimage {
    background: #fff;
    border: 2px dashed #C0CCDA;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    overflow: visible;
}

.image_addon .addimage .add_img_ico {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.image_addon .addimage .add_img_ico svg {
    width: 28px;
    height: 28px;
}

.image_addon .addimage .add_img_label {
    font-size: 10px;
    font-weight: 600;
    color: #c0ccda;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* 已上传数量徽章 */
.image_addon .addimage .media_count_badge {
    display: none;
    position: absolute;
    top: -7px;
    right: -7px;
    background: #ff8200;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    text-align: center;
    line-height: 20px;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(255, 130, 0, 0.4);
    z-index: 5;
}

/* =========================================
   媒体缩略图
   ========================================= */
.image_addon .image_item .media_thumb {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.image_addon .image_item .img_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image_addon .image_item .video_thumb {
    position: relative;
    background: #111;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.image_addon .image_item .video_thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image_addon .image_item .video_play_icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 14px;
}

/* =========================================
   删除按钮
   ========================================= */
.image_addon .image_item .delete_img {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    background: #ff3b30;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.35);
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease;
}

.image_addon .image_item .delete_img:active {
    transform: scale(0.82);
}

/* =========================================
   单张上传中覆盖层
   ========================================= */
.image_addon .image_item .upload_item_overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 6;
}

.upload_item_spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: itemSpin 0.65s linear infinite;
}

@keyframes itemSpin {
    to { transform: rotate(360deg); }
}

.retry_text {
    font-size: 9px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.image_addon .image_item.upload_failed .upload_item_overlay {
    background: rgba(255, 59, 48, 0.6);
}

.failed_icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* =========================================
   提交按钮
   ========================================= */
.report_form .submit_report {
    width: 100%;
    padding: 15px 20px;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    background: var(--primary, #ff8200);
    transition: opacity 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.report_form .submit_report:active {
    transform: scale(0.97);
    opacity: 0.85;
}

.report_form .submit_report:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   报修上下文（简约一行）
   ========================================= */
/* =========================================
   Form clarity: labels & hints
   ========================================= */
.report_box .form_intro {
    margin: -8px 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #667085;
}

.report_form .form_field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report_form .form_label {
    font-size: 14px;
    font-weight: 600;
    color: #201E1E;
}

.report_form .form_label .required {
    color: #e11d48;
}

.report_form .field_hint {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    color: #98A2B3;
}

.report_form .field_hint--block {
    margin: 0;
}

.report_form .form_field--photos .image_addon {
    margin-top: 4px;
}

.report_box .report_context {
    margin: -8px 0 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #888;
}

/* =========================================
   响应式
   ========================================= */
@media (max-width: 480px) {
    .image_addon .image_item {
        width: 72px;
        height: 72px;
        border-radius: 14px;
    }

    .image_addon .addimage .add_img_ico svg {
        width: 24px;
        height: 24px;
    }

    .report_form input[type="text"],
    .report_form textarea {
        font-size: 16px; /* 防止 iOS 自动缩放 */
    }
}
