/* ============================================================
   FLOATING CONTACT WIDGET — Red Star theme
   float-contact.css
   ============================================================ */

:root {
    --fcw-primary:  #001F47;
    --fcw-accent:   #AEDA1F;
    --fcw-accent-h: #92b814;
    --fcw-white:    #ffffff;
    --fcw-shadow:   0 8px 40px rgba(0, 31, 71, .28);
    --fcw-radius:   14px;
    --fcw-z:        9999;
}

/* --- 整体容器 --- */
.fcw-wrap {
    position: fixed;
    bottom: 2rem;
    right: 1.75rem;
    z-index: var(--fcw-z);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .75rem;
}

/* --- 展开面板 --- */
.fcw-panel {
    background: var(--fcw-white);
    border-radius: var(--fcw-radius);
    box-shadow: var(--fcw-shadow);
    overflow: hidden;
    width: 360px;
    transform-origin: bottom right;
    transform: scale(.85) translateY(16px);
    opacity: 0;
    visibility: hidden;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1),
                opacity   .28s ease,
                visibility .28s ease;
    border-top: 3px solid var(--fcw-accent);
}

.fcw-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* --- 渠道行 --- */
.fcw-channel {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .9rem 1.1rem;
    border-bottom: 1px solid #f0f2f5;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: var(--fcw-primary);
    background: var(--fcw-white);
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, border-left-color .18s ease;
}

.fcw-channel:last-of-type {
    border-bottom: none;
}

.fcw-channel:hover {
    background: #f6f9ff;
    border-left-color: var(--fcw-accent);
}

/* 图标圈 */
.fcw-ch-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}

.fcw-channel:hover .fcw-ch-icon {
    transform: scale(1.1);
}

.fcw-wa    .fcw-ch-icon { background: #d9f5e7; color: #25d366; }
.fcw-email .fcw-ch-icon { background: #e8efff; color: var(--fcw-primary); }
.fcw-inquiry-btn .fcw-ch-icon { background: rgba(174, 218, 31, .15); color: var(--fcw-accent-h); }

.fcw-ch-icon svg {
    width: 20px;
    height: 20px;
}

/* 文字 */
.fcw-ch-label {
    display: block;
    font-weight: 700;
    font-size: .875rem;
    color: var(--fcw-primary);
    line-height: 1.2;
}

.fcw-ch-sub {
    display: block;
    font-size: .75rem;
    color: #6b7b9a;
    margin-top: .15rem;
}

/* --- Inquiry 表单面板 --- */
.fcw-form-panel {
    background: var(--fcw-white);
    border-top: 1px solid #e8ecf2;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
}

.fcw-form-panel.open {
    max-height: 640px;
}

.fcw-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1.1rem;
    background: var(--fcw-primary);
    color: var(--fcw-white);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .04em;
}

.fcw-form-close {
    background: transparent;
    color: rgba(255, 255, 255, .7);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 .25rem;
    transition: color .15s;
    border: none;
    cursor: pointer;
}

.fcw-form-close:hover {
    color: var(--fcw-accent);
}

.fcw-form {
    padding: .85rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.fcw-field input,
.fcw-field textarea {
    width: 100%;
    padding: .55rem .75rem;
    font-size: .82rem;
    font-family: inherit;
    border: 1.5px solid #dde3ee;
    border-radius: 6px;
    color: var(--fcw-primary);
    background: #f8fafd;
    transition: border-color .18s, box-shadow .18s;
    resize: vertical;
}

.fcw-field input:focus,
.fcw-field textarea:focus {
    outline: none;
    border-color: var(--fcw-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(174, 218, 31, .18);
}

.fcw-submit {
    margin-top: .25rem;
    width: 100%;
    padding: .65rem 1rem;
    background: var(--fcw-accent);
    color: var(--fcw-primary);
    font-weight: 700;
    font-size: .85rem;
    font-family: inherit;
    letter-spacing: .05em;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .18s, transform .15s;
}

.fcw-submit:hover {
    background: var(--fcw-accent-h);
    transform: translateY(-1px);
}

.fcw-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.fcw-form-note {
    font-size: .7rem;
    color: #8a9ab8;
    text-align: center;
    margin-top: .1rem;
}

/* 成功提示 */
.fcw-form-success {
    padding: 1.5rem 1.1rem;
    text-align: center;
    color: var(--fcw-primary);
}

.fcw-form-success svg {
    display: block;
    margin: 0 auto .5rem;
    width: 40px;
    height: 40px;
    stroke: #25c16f;
}

.fcw-form-success p {
    font-size: .875rem;
    font-weight: 600;
}

/* reCAPTCHA 容器（标准尺寸，与输入框风格统一） */
.fcw-recaptcha {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: .1rem 0 .5rem;
    padding: .5rem;
    background: #f8fafd;
    border: 1.5px solid #eef1f7;
    border-radius: 6px;
}

.fcw-recaptcha > div {
    border-radius: 3px;
    overflow: hidden;
}

/* 错误提示 */
.fcw-form-error {
    padding: 1.3rem 1.1rem;
    text-align: center;
    color: var(--fcw-primary);
}

.fcw-form-error svg {
    display: block;
    margin: 0 auto .5rem;
    width: 40px;
    height: 40px;
    stroke: #ef4444;
}

.fcw-form-error p {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.5;
}

/* --- 主触发按钮 --- */
.fcw-trigger {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid var(--fcw-accent);
    background: var(--fcw-primary);
    color: var(--fcw-white);
    box-shadow: 0 6px 24px rgba(0, 31, 71, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s, color .2s;
}

.fcw-trigger:hover {
    background: var(--fcw-accent);
    color: var(--fcw-primary);
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(174, 218, 31, .45);
}

.fcw-trigger-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcw-trigger svg {
    width: 24px;
    height: 24px;
}

/* --- 未读气泡 --- */
.fcw-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e63946;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    pointer-events: none;
    animation: fcwPulse 2s ease-in-out infinite;
}

@keyframes fcwPulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.2); }
}

/* --- 响应式 --- */
@media (max-width: 480px) {
    .fcw-wrap  { bottom: 1.25rem; right: 1rem; }
    .fcw-panel { width: calc(100vw - 2rem); }
}

/* reCAPTCHA normal 尺寸 (304px) 稍缩小以确保在 360px 面板里一行显示 */
.fcw-recaptcha > .g-recaptcha {
    transform: scale(.97);
    transform-origin: center center;
}
@media (max-width: 380px) {
    .fcw-recaptcha > .g-recaptcha { transform: scale(.92); }
}
@media (max-width: 340px) {
    .fcw-recaptcha > .g-recaptcha { transform: scale(.85); }
}
