/* ============================================================
   Aiverse 主题自定义样式（tt_aiverse1）
   说明：以下样式为 AI 工具页 / 账户页 / 充值页在本站特有的
   补充样式，与模板自带 style.css（Bootstrap 5.2 全量）配合使用，
   均含中文注释。模板主色变量：--p1（深绿）/ --p2（亮绿）。
   ============================================================ */

/* ------------------------------------------------------------
   一、AI 工具页通用布局（左参数面板 + 右记录列表）
   卡片底子由 white__bg__3 / br__20 / shadow-2 / p__40 提供，
   这里补充吸顶、标题装饰和细节交互。
   ------------------------------------------------------------ */

/* 左侧参数面板：桌面端跟随滚动吸顶，方便边滚动边调参数 */
.tool__panel {
    position: sticky;
    top: 20px;
}

/* 面板标题：左侧绿色装饰竖条（呼应模板主色 --p1） */
.tool__panel__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--s1);
    margin-bottom: 24px;
    position: relative;
    padding-left: 14px;
    text-align: left;
}
.tool__panel__title::before {
    content: "";
    width: 5px;
    height: 20px;
    background: var(--p1);
    position: absolute;
    left: 0;
    top: 4px;
    border-radius: 10px;
}

/* 参数项间距 */
.paramet-item { margin-bottom: 22px; }

/* 参数下拉 / 输入框聚焦态：主色描边 */
.paramet-item .form-select:focus,
.paramet-item .form-control:focus {
    border-color: var(--p1);
    box-shadow: 0 0 0 0.2rem rgba(16, 101, 78, .15);
}

/* 上传区域：虚线框，悬停变主色 */
.upload-container {
    border: 2px dashed var(--n4);
    border-radius: 10px;
    background: var(--n3);
    padding: 25px 20px;
    text-align: center;
    position: relative;
    transition: all .3s ease;
    cursor: pointer;
}
.upload-container:hover {
    border-color: var(--p1);
    background: var(--p6);
}
/* 隐藏的原生 file 控件铺满上传框（点整个框都能选文件） */
.upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* 上传提示 / 预览文字与预览图 */
.upload-preview {
    font-size: 14px;
    color: var(--s6);
    line-height: 1.7;
    word-break: break-word;
}
.upload-preview img { max-width: 100%; border-radius: 8px; }

/* "开始转换"按钮（#create-img 为页面 JS 绑定事件的钩子） */
#create-img {
    transition: all .3s ease;
    box-shadow: 0 8px 20px rgba(16, 101, 78, .25);
}
#create-img:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 101, 78, .35);
    color: #fff;
}

/* 右侧记录列表卡片：最低高度避免空列表时塌陷 */
.tool__list { min-height: 700px; }

/* ------------------------------------------------------------
   二、记录列表（mescroll 插件容器 + JS 生成的记录行）
   ------------------------------------------------------------ */

/* 列表滚动区：限高内部滚动 */
.tool__list.mescroll {
    max-height: 760px;
    overflow-y: auto;
}
.tool__list.mescroll::-webkit-scrollbar { width: 6px; }
.tool__list.mescroll::-webkit-scrollbar-thumb {
    background: var(--n4);
    border-radius: 20px;
}
.tool__list.mescroll::-webkit-scrollbar-track { background: transparent; }

/* 记录表格行 */
.tool__list .table { margin-bottom: 0; vertical-align: middle; }
.tool__list .table tbody tr {
    transition: all .25s ease;
    border-bottom: 1px solid var(--n2);
}
.tool__list .table tbody tr:hover { background: var(--p6); }
.tool__list .table td {
    padding: 18px 15px;
    font-size: 14px;
    color: #444;
    vertical-align: middle;
}
/* 积分明细表头（pointsDetails 页） */
.tool__list .table thead th {
    font-size: 15px;
    font-weight: 700;
    color: var(--s1);
    border-bottom: 2px solid var(--p1);
    padding: 12px 15px;
    white-space: nowrap;
}

/* 记录为空时 mescroll 首帧的兜底提示（插件空态渲染前） */
#get-content-list:empty::after {
    content: "No records yet";
    display: block;
    text-align: center;
    padding: 120px 20px;
    color: var(--s7);
    font-size: 15px;
}

/* 记录行里的缩略图（图片类工具：colorize / pdf_to_image 等） */
.get-content-list .user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.get-content-list .user img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(16, 101, 78, .25);
}
.get-content-list .user span { font-size: 13px; color: var(--s6); }

/* 生成中 / 失败状态文字（JS 切换 .await，生成完移除） */
.in-image { color: var(--p1) !important; font-weight: 600; }
.error_info { color: #dc3545 !important; }
.myhidden { display: none !important; }

/* 异构工具页（pdf_to_word 等）JS 生成的记录卡片行（沿用旧类名） */
.services-details-text {
    padding: 18px 0;
    border-bottom: 1px solid var(--n2);
}
.service-details-text-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.service-details-text-content p { margin: 0; font-size: 14px; color: #444; }

/* 记录行里的下载按钮（JS 生成的 .blogsingle-badge / .download-img） */
.blogsingle-badge,
.get-content-list .download-img.btn {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    background: var(--p1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}
.blogsingle-badge:hover,
.get-content-list .download-img.btn:hover {
    background: #0b4a39;
    color: #fff;
    text-decoration: none;
}

/* ------------------------------------------------------------
   三、参数药丸选项（pdf_to_word 的 docx / odt 切换）
   JS 依赖 .param-option 的 active 类切换，这里提供两种状态样式
   ------------------------------------------------------------ */
.param-group .param-option {
    display: inline-block;
    padding: 8px 22px;
    margin: 0 6px 6px 0;
    border: 1px solid var(--n4);
    border-radius: 50px;
    background: #fff;
    color: var(--s6);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
}
.param-group .param-option:hover {
    border-color: var(--p1);
    color: var(--p1);
}
.param-group .param-option.active {
    background: var(--p1);
    border-color: var(--p1);
    color: #fff;
}

/* ------------------------------------------------------------
   四、定价卡片（plans 订阅页 / recharge 充值页）
   JS 依赖：.pricing-item 的 active 切换、data-id / data-price、
   .points 积分文本、input[name='customize'] 自定义金额
   ------------------------------------------------------------ */
.pricing-item {
    position: relative;
    cursor: pointer;
    transition: all .25s ease;
}
.pricing-item:hover { transform: translateY(-4px); }
/* 选中态：亮绿描边高亮（按需求不放"Selected"角标，描边即选中指示） */
.pricing-item.active {
    box-shadow: 0 0 0 3px var(--p2), 0 20px 40px rgba(8, 33, 68, .12) !important;
}

/* 充值页自定义金额输入框：去浏览器加减步进按钮 */
.pricing-item input[type="number"]::-webkit-outer-spin-button,
.pricing-item input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pricing-item input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 充值页"立即充值"大按钮最小宽度 */
.top-up-btn { min-width: 220px; }

/* ------------------------------------------------------------
   五、layer 弹窗（支付弹窗 payhtml / 协议弹窗，公共补充）
   payhtml.twig 按约定不修改，其标记沿用旧版写法，
   这里对齐 Bootstrap 5 下的显示差异。
   ------------------------------------------------------------ */
.model-content {
    padding: 1.5rem;
    color: rgba(0, 0, 0, 0.9) !important;
    text-align: left;
}
.layui-layer-dialog .layui-layer-content { color: #333; }
.pay-model h3 { color: #333; }

/* 小标题（Card Number / Expiry Date 等）：左对齐 */
.pay-model .h6 {
    font-size: 16px;
    font-weight: 600;
    color: var(--s1);
    text-align: left;
}

/* 输入组：同行多个控件（如年/月下拉）均分整行宽度 */
.pay-model .input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.5rem;
    justify-content: center;
}
.pay-model .input-group .form-control {
    flex: 1 1 0;
    width: auto;
    max-width: none;
}

/* 协议勾选行：原生复选框可见并使用主题色 */
.pay-model .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1rem;
}
.pay-model .checkbox label { color: #212529; font-weight: 400; }
.pay-model .checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 6px 8px 0 0;
    accent-color: var(--p1);
}

/* 底部按钮区（Add Billing Address / Pay） */
.pay-model .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 1rem;
    border-top: 1px solid var(--n4);
}

/* 弹窗内协议链接颜色 */
.pay-model .checkbox label a { color: var(--p1); }

/* ------------------------------------------------------------
   六、头部积分数字高亮（工具页 JS 更新 #user_points 的值）
   ------------------------------------------------------------ */
.header_btn cc {
    font-weight: 700;
    color: var(--p2);
}

/* 头部 / 侧边导航 logo 自适应：模板把宽度写死 200px 会把站标文字压扁裁切，
   这里改为限高自适应宽度（选择器与模板同级并加 !important 覆盖） */
.header_section nav .navbar .logo img {
    width: auto !important;
    max-height: 48px;
}
.header_section nav .navbar .nav-links .sidebar-logo img {
    width: auto !important;
    max-height: 40px;
}
/* 头部右侧按钮组不换行挤压导航（小屏时自动换行已由 flex-wrap 处理） */
.header_section .header_btn { white-space: nowrap; }

/* ------------------------------------------------------------
   六（续）、首页 FAQ 区浅绿背景（通栏铺满）
   背景保留浅绿 var(--p6) 与白底 Transform 区拉开层次，通栏铺满不内缩；
   内容两侧加内边距。仅首页 #content 内生效，/faq 独立页不受影响。
   ------------------------------------------------------------ */
#content .faq {
    background: var(--p6);
    /* 通栏背景 + 内容两侧内边距（小屏 16px，宽屏最多 48px，桌面端 container 本身还会居中内缩） */
    padding-top: 110px;
    padding-bottom: 120px;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
}
/* FAQ 手风琴条目：内容左右留 15px 内边距，避免文字贴卡片边 */
.faq .accordion .accordion-border { padding: 0 15px; }

/* ------------------------------------------------------------
   七、移动端适配
   ------------------------------------------------------------ */
@media (max-width: 991px) {
    .tool__panel {
        position: static;
        margin-bottom: 20px;
    }
    .tool__panel, .tool__list { padding: 20px !important; }
    .tool__list { min-height: auto; }
    /* 面包屑横幅与内页内容间距收紧 */
    .tool__page, .price__page, .faq, .login__section,
    .register__section, .thank__you__section, .blog__details {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}
