/* ==========================================================================
   富源晟科技 · 公共组件（右侧浮窗 / 联系小卡片 / 提交需求弹窗）
   ========================================================================== */

/* ---------- 右侧固定服务浮窗 ---------- */
.side-service-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    width: 72px;
    background: #fff;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 4px 20px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.side-service-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 4px;
    min-height: 74px;
    color: #c8102e;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.3;
    border-bottom: 1px solid #f2f2f2;
    transition: background .2s, color .2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.side-service-item:last-child {
    border-bottom: none;
}

.side-service-item i {
    font-size: 22px;
    margin-bottom: 6px;
}

.side-service-item:hover {
    background: #fff0f2;
}

.side-service-item.contact {
    background: #c8102e;
    color: #fff;
}

.side-service-item.contact:hover {
    background: #a50c25;
}

.side-service-item .sf-tip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) scale(.9);
    background: rgba(10, 25, 47, .9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}

.side-service-item:hover .sf-tip {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.side-service-item .sf-tip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid rgba(10, 25, 47, .9);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

@media (max-width: 768px) {
    .side-service-bar {
        width: 60px;
    }

    .side-service-item {
        min-height: 62px;
        font-size: 11px;
        padding: 10px 2px;
    }

    .side-service-item i {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .side-service-item .sf-tip {
        display: none;
    }
}

/* ---------- 联系小弹窗 ---------- */
.sf-popover {
    position: fixed;
    right: 84px;
    z-index: 10001;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, .18);
    padding: 16px 18px 14px;
    min-width: 220px;
    max-width: 260px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(.92);
    transition: opacity .2s, transform .2s;
    font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

.sf-popover.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.sf-popover::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #fff;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.sf-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.sf-popover-title {
    font-size: 14px;
    color: #0a192f;
    font-weight: 600;
}

.sf-popover-name {
    font-size: 12px;
    color: #c8102e;
    background: #fff0f2;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.sf-popover-qr {
    text-align: center;
    margin: 4px 0 10px;
}

.sf-popover-qr img {
    width: 140px;
    height: 140px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 4px;
    background: #fff;
    display: inline-block;
}

.sf-popover-qr-tip {
    font-size: 11px;
    color: #9ca3af;
    margin: 6px 0 0;
    line-height: 1.4;
}

.sf-popover-qr-tip i {
    color: #07c160;
    margin-right: 3px;
}

.sf-popover-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    color: #c8102e;
    font-weight: 700;
    letter-spacing: .3px;
    background: #fff5f7;
    border-left: 3px solid #c8102e;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    word-break: break-all;
}

.sf-popover-value i {
    font-size: 14px;
    flex-shrink: 0;
}

.sf-popover-value.email {
    font-size: 14px;
    letter-spacing: 0;
}

.sf-popover-actions {
    display: flex;
    gap: 8px;
}

.sf-popover-btn {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #c8102e;
    background: #fff;
    color: #c8102e;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s, color .2s;
    font-family: inherit;
    display: inline-block;
}

.sf-popover-btn:hover {
    background: #fff0f2;
}

.sf-popover-btn.primary {
    background: #c8102e;
    color: #fff;
}

.sf-popover-btn.primary:hover {
    background: #a50c25;
}

.sf-popover-btn.copied {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

@media (max-width: 768px) {
    .sf-popover {
        display: none !important;
    }
}

/* ---------- 提交需求弹窗 ---------- */
.demand-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.demand-modal-overlay.active {
    display: flex;
}

.demand-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    position: relative;
    animation: modalPop .25s ease;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(.95); }
    to { opacity: 1; transform: scale(1); }
}

.demand-modal h3 {
    margin: 0 0 18px;
    font-size: 20px;
    color: #0a192f;
}

.demand-modal .close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.demand-modal .close:hover {
    color: #666;
}

.demand-modal .form-group {
    margin-bottom: 14px;
}

.demand-modal label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.demand-modal input,
.demand-modal textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.demand-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.demand-modal input:focus,
.demand-modal textarea:focus {
    outline: none;
    border-color: #c8102e;
}

.demand-modal .btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #c8102e;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}

.demand-modal .btn-submit:hover {
    background: #a50c25;
}

.demand-modal .btn-submit:disabled {
    background: #d9a3ad;
    cursor: not-allowed;
}

.demand-modal .success {
    display: none;
    text-align: center;
    color: #059669;
    font-size: 15px;
    padding: 20px 0;
}

.demand-modal .success i {
    display: block;
    font-size: 34px;
    margin-bottom: 8px;
}

.demand-modal .form-error {
    display: none;
    color: #c8102e;
    background: #fff0f2;
    border-left: 3px solid #c8102e;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 10px;
    margin-bottom: 10px;
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10002;
    inset: 0;
    background: rgba(4, 8, 15, .94);
    padding: 4vh 4vw;
}

.lightbox-content {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    margin: 0 auto;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 30px;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
}

.lightbox-close:hover {
    opacity: 1;
}

#lightbox-caption {
    text-align: center;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    margin-top: 18px;
}

/* ---------- 返回顶部 ---------- */
.fx-top {
    position: fixed;
    right:20px;
    bottom: 132px;
    z-index: 9998;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: rgba(11, 17, 32, .82);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s,
        background .2s ease, border-color .2s ease;
}

/* 滚动进度环 */
/* .fx-top::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(var(--fx-brand) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .12) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
    pointer-events: none;
} */

.fx-top i {
    position: relative;
    z-index: 1;
}

.fx-top.is-on {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.fx-top:hover,
.fx-top:focus-visible {
    background: var(--fx-brand);
    border-color: var(--fx-brand);
    outline: none;
}

.fx-top:active {
    transform: scale(.94);
}

@media (max-width: 768px) {
    .fx-top {
        right: 74px;
        bottom: 20px;
        width: 42px;
        height: 42px;
    }

    /* 避免返回顶部按钮压住页脚版权行 */
    footer .footer-bottom {
        padding-bottom: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fx-top {
        transition: opacity .15s ease, visibility .15s;
    }
}
