/* ===== 弹窗遮罩 ===== */
.fs-cl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483646; /* 比内容加密插件低1 */
}

/* ===== 弹窗主体 ===== */
.fs-cl-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,.25);
    animation: fs-cl-modal-in .25s ease;
    resize: none;
}
/* 小屏幕下确保不滚动 */
@media (max-width: 480px) {
    .fs-cl-modal-box {
        max-height: 95vh;
    }
}
@keyframes fs-cl-modal-in {
    from { opacity: 0; transform: scale(.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== 弹窗头部 ===== */
.fs-cl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-radius: 12px 12px 0 0;
}
.fs-cl-modal-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}
.fs-cl-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0 4px;
    transition: color .2s;
}
.fs-cl-modal-close:hover {
    color: #333;
}

/* ===== 弹窗表单 ===== */
.fs-cl-modal-body {
    padding: 12px 16px;
}
.fs-cl-form-group {
    margin-bottom: 8px;
}
.fs-cl-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}
.fs-cl-required {
    color: #f5222d;
}
.fs-cl-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color .2s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}
.fs-cl-input:focus {
    outline: none;
    border-color: #4f8df7;
    box-shadow: 0 0 0 2px rgba(79,141,247,.15);
}
.fs-cl-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-family: inherit;
}
.fs-cl-textarea:focus {
    outline: none;
    border-color: #4f8df7;
    box-shadow: 0 0 0 2px rgba(79,141,247,.15);
}
.fs-cl-input-row {
    display: flex;
    gap: 8px;
}
.fs-cl-input-row .fs-cl-input {
    flex: 1;
}
.fs-cl-btn-fetch {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid #4f8df7;
    background: #fff;
    color: #4f8df7;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}
.fs-cl-btn-fetch:hover {
    background: #4f8df7;
    color: #fff;
}
.fs-cl-btn-fetch:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ===== 续费状态提示 ===== */
.fs-cl-renewal-info {
    margin-top: 8px;
    padding: 0;
}
.fs-cl-renewal-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #096dd9;
}
.fs-cl-renewal-icon {
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}
.fs-cl-renewal-detail {
    font-size: 12px;
    opacity: .85;
}
.fs-cl-renewal-tip {
    margin: 6px 0 0;
    font-size: 12px;
    color: #52c41a;
    padding-left: 4px;
}
.io-black-mode .fs-cl-renewal-badge,
.dark .fs-cl-renewal-badge {
    background: rgba(24,144,255,.12);
    border-color: rgba(24,144,255,.35);
    color: #69c0ff;
}
.io-black-mode .fs-cl-renewal-tip,
.dark .fs-cl-renewal-tip {
    color: #52c41a;
}

/* ===== 月数选项 ===== */
.fs-cl-months-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}
.fs-cl-month-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 6px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    position: relative;
}
.fs-cl-month-option:hover {
    border-color: #4f8df7;
}
.fs-cl-month-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}
.fs-cl-month-option input[type="radio"]:checked + .fs-cl-month-label {
    color: #4f8df7;
}
.fs-cl-month-option:has(input:checked) {
    border-color: #4f8df7;
    background: #f0f6ff;
}
.fs-cl-month-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1px;
}
.fs-cl-month-price {
    font-size: 15px;
    font-weight: 700;
    color: #f5222d;
}
.fs-cl-month-save {
    font-size: 11px;
    color: #52c41a;
}

/* ===== 支付方式 + 合计 并排 ===== */
.fs-cl-pay-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.fs-cl-pay-section {
    flex: 1;
    min-width: 0;
}
.fs-cl-price-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    white-space: nowrap;
    padding-bottom: 2px;
}

/* ===== 支付方式选项 ===== */
.fs-cl-pay-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.fs-cl-pay-option {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
    font-size: 13px;
}
.fs-cl-pay-option:hover {
    border-color: #4f8df7;
}
.fs-cl-pay-option input[type="radio"] {
    margin-right: 6px;
}
.fs-cl-pay-option:has(input:checked) {
    border-color: #4f8df7;
    background: #f0f6ff;
}
.fs-cl-no-payment {
    color: #999;
    font-size: 13px;
    margin: 0;
}

/* ===== 价格展示（已合并到支付方式行） ===== */
.fs-cl-price-label {
    font-size: 13px;
    color: #666;
}
.fs-cl-price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #f5222d;
    margin-left: 6px;
}

/* ===== 提交按钮 ===== */
.fs-cl-btn-submit {
    width: 100%;
    padding: 10px;
    background: #4f8df7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.fs-cl-btn-submit:hover:not(:disabled) {
    background: #3a7be0;
}
.fs-cl-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== 支付结果区域 ===== */
.fs-cl-modal-payment {
    padding: 30px 22px;
    text-align: center;
}
.fs-cl-payment-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.fs-cl-payment-amount {
    font-size: 28px;
    font-weight: 700;
    color: #f5222d;
}
.fs-cl-payment-order {
    font-size: 13px;
    color: #999;
}
.fs-cl-payment-qrcode {
    margin: 16px 0;
}
.fs-cl-payment-qrcode img {
    width: 200px;
    height: 200px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}
.fs-cl-payment-qrcode p {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}
.fs-cl-btn-pay {
    display: inline-block;
    padding: 12px 36px;
    background: #4f8df7;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background .2s;
}
.fs-cl-btn-pay:hover {
    background: #3a7be0;
}
.fs-cl-payment-status {
    margin-top: 12px;
    font-size: 14px;
    color: #999;
}
.fs-cl-payment-status.fs-cl-payment-success {
    color: #52c41a;
    font-weight: 600;
}
.fs-cl-payment-status.fs-cl-payment-error {
    color: #f5222d;
    font-weight: 600;
}

/* ===== 二维码独立支付弹窗 ===== */
.fs-cl-qrcode-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    animation: fs-cl-qrcode-fadein .2s ease;
}
@keyframes fs-cl-qrcode-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fs-cl-qrcode-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px 20px;
    text-align: center;
    width: 90%;
    max-width: 320px;
    position: relative;
    box-shadow: 0 12px 48px rgba(0,0,0,.3);
    animation: fs-cl-qrcode-pop .25s ease;
}
@keyframes fs-cl-qrcode-pop {
    from { transform: scale(.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.fs-cl-qrcode-modal-box h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.fs-cl-qrcode-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 22px;
    color: #999;
    line-height: 1;
    transition: color .2s;
}
.fs-cl-qrcode-modal-close:hover {
    color: #666;
}
.fs-cl-qrcode-amount {
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}
.fs-cl-qrcode-amount em {
    font-style: normal;
    font-size: 24px;
    font-weight: 700;
    color: #f5222d;
    margin-left: 4px;
}
.fs-cl-qrcode-img {
    padding: 10px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 12px;
}
.fs-cl-qrcode-img img {
    width: 200px;
    height: 200px;
    display: block;
}
.fs-cl-qrcode-extra {
    margin-bottom: 10px;
}
.fs-cl-qrcode-order {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 8px;
}
.fs-cl-qrcode-status {
    font-size: 14px;
    color: #999;
    margin-bottom: 6px;
}
.fs-cl-qrcode-status.fs-cl-qrcode-success {
    color: #52c41a;
    font-weight: 600;
}
.fs-cl-qrcode-tip {
    font-size: 12px;
    color: #ccc;
}

/* ===== 浮动入口按钮 ===== */
.fs-cl-float-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #4f8df7;
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79,141,247,.4);
    z-index: 9999;
    transition: transform .2s, box-shadow .2s;
    font-size: 14px;
    font-weight: 600;
}
.fs-cl-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,141,247,.5);
}
.fs-cl-float-icon {
    font-size: 20px;
    line-height: 1;
}

/* ===== Toast 提示 ===== */
.fs-cl-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 28px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 2147483647;
    transition: transform .3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    pointer-events: none;
}
.fs-cl-toast-show {
    transform: translateX(-50%) translateY(0);
}
.fs-cl-toast-success { background: #52c41a; }
.fs-cl-toast-error   { background: #f5222d; }
.fs-cl-toast-info    { background: #1890ff; }

/* ===== 暗黑模式 ===== */
.io-black-mode .fs-cl-modal-box,
.dark .fs-cl-modal-box {
    background: #2a2a2a;
    color: #e0e0e0;
}
.io-black-mode .fs-cl-modal-header,
.dark .fs-cl-modal-header {
    background: #2a2a2a;
    border-bottom-color: #3a3a3a;
}
.io-black-mode .fs-cl-modal-close,
.dark .fs-cl-modal-close {
    color: #888;
}
.io-black-mode .fs-cl-modal-close:hover,
.dark .fs-cl-modal-close:hover {
    color: #fff;
}
.io-black-mode .fs-cl-label,
.dark .fs-cl-label {
    color: #ccc;
}
.io-black-mode .fs-cl-input,
.dark .fs-cl-input,
.io-black-mode .fs-cl-textarea,
.dark .fs-cl-textarea {
    background: #1a1a1a;
    border-color: #444;
    color: #e0e0e0;
}
.io-black-mode .fs-cl-input:focus,
.dark .fs-cl-input:focus,
.io-black-mode .fs-cl-textarea:focus,
.dark .fs-cl-textarea:focus {
    border-color: #4f8df7;
}
.io-black-mode .fs-cl-btn-fetch,
.dark .fs-cl-btn-fetch {
    background: #2a2a2a;
    color: #4f8df7;
    border-color: #4f8df7;
}
.io-black-mode .fs-cl-month-option,
.dark .fs-cl-month-option {
    border-color: #444;
}
.io-black-mode .fs-cl-month-option:has(input:checked),
.dark .fs-cl-month-option:has(input:checked) {
    background: #1a2333;
}
.io-black-mode .fs-cl-pay-option,
.dark .fs-cl-pay-option {
    border-color: #444;
}
.io-black-mode .fs-cl-pay-option:has(input:checked),
.dark .fs-cl-pay-option:has(input:checked) {
    background: #1a2333;
}
.io-black-mode .fs-cl-price-label,
.dark .fs-cl-price-label {
    color: #999;
}
.io-black-mode .fs-cl-payment-qrcode img,
.dark .fs-cl-payment-qrcode img {
    border-color: #3a3a3a;
}
.io-black-mode .fs-cl-payment-order,
.dark .fs-cl-payment-order {
    color: #666;
}
.io-black-mode .fs-cl-payment-status,
.dark .fs-cl-payment-status {
    color: #666;
}
/* 二维码独立弹窗深色模式 */
.io-black-mode .fs-cl-qrcode-modal-box,
.dark .fs-cl-qrcode-modal-box {
    background: #2a2a2a;
}
.io-black-mode .fs-cl-qrcode-modal-box h3,
.dark .fs-cl-qrcode-modal-box h3 {
    color: #e0e0e0;
}
.io-black-mode .fs-cl-qrcode-amount,
.dark .fs-cl-qrcode-amount {
    color: #999;
}
.io-black-mode .fs-cl-qrcode-img,
.dark .fs-cl-qrcode-img {
    background: #fff;
    border-color: #444;
}
.io-black-mode .fs-cl-qrcode-order,
.dark .fs-cl-qrcode-order {
    color: #555;
}
.io-black-mode .fs-cl-qrcode-status,
.dark .fs-cl-qrcode-status {
    color: #666;
}
.io-black-mode .fs-cl-qrcode-tip,
.dark .fs-cl-qrcode-tip {
    color: #555;
}
.io-black-mode .fs-cl-qrcode-modal-close,
.dark .fs-cl-qrcode-modal-close {
    color: #666;
}
.io-black-mode .fs-cl-qrcode-modal-close:hover,
.dark .fs-cl-qrcode-modal-close:hover {
    color: #999;
}

/* ===== 弹窗响应式 ===== */
@media (max-width: 480px) {
    .fs-cl-modal-box {
        width: 95%;
        max-width: none;
    }
    .fs-cl-months-options {
        grid-template-columns: repeat(2, 1fr);
    }
    .fs-cl-float-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}
