﻿/* 弹窗遮罩层 */
.subscribe-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 添加这行 */
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}
/* 弹窗主体 */
.subscribe-modal {
    position: fixed;
    width: 680px;
    height: 530px;
    background: #fff;
    background-image: url('/Content/Images/showWin.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 24px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.3s;
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
    /* 可选：文字半透明遮罩层 */
    .subscribe-modal::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.7);
        z-index: 0;
        border-radius: inherit;
    }

    .subscribe-modal > * {
        position: relative;
        z-index: 1;
    }

    .subscribe-modal .field-validation-error {
        color: #e74c3c;
        font-size: 12px;
        display: block;
        margin-top: 4px;
    }

    .subscribe-modal .input-validation-error {
        border-color: #e74c3c;
    }
    /* 关闭动画（向右滑出） */
    .subscribe-modal.close-animation {
        transform: translateX(100%) !important;
        opacity: 0;
    }
/* 贴边按钮 - 固定在左侧中央 */
.floating-btn-right {
    position: fixed;
    right: 0; /* 贴右边 */
    top: 50%;
    transform: translateY(-50%);
    background: #000000;
    color: white;
    border: none;
    border-radius: 30px 0 0 30px; /* 圆角在左侧 */
    padding: 12px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9997;
    transition: all 0.3s ease;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.2);
    writing-mode: vertical-rl;
    letter-spacing: 2px;
}

    .floating-btn-right:hover {
        background: #1e9b9d;
        padding-left: 20px;
    }
/* 响应式：窗口宽度 ≤ 768px 时贴右边并垂直居中 */
@media (max-width: 768px) {
    .subscribe-modal {
        width: 90%;
        max-width: 400px;
        height: auto;
        max-height: 90vh;
    }

        .subscribe-modal .modal-content {
            padding: 0 20px 32px !important; /* 左右内边距从 32px 改为 20px */
        }

    .floating-btn-right {
        writing-mode: vertical-rl; /* 竖排文字，与PC一致 */
        padding: 12px 6px; /* 左右窄，上下宽 */
        font-size: 12px;
        top: 50%; /* 垂直居中 */
        bottom: auto;
        right: 0;
        transform: translateY(-50%); /* 居中偏移 */
        border-radius: 20px 0 0 20px;
    }

    .subscribe-modal .modal-title {
        font-size: 22px;
    }

    .subscribe-modal .modal-subtitle {
        font-size: 14px;
    }

    .subscribe-modal .close-btn {
        right: 20px;
        top: 20px;
        font-size: 32px;
        transform: none;
    }
}
/* 弹窗内部样式 */

.subscribe-modal .close-btn {
    position: absolute;
    right: 24px; /* 原 16px → 24px，增加右边距 */
    top: 24px; /* 原 50% translateY 改为固定 top 值，避免垂直居中导致太靠中 */
    transform: none; /* 取消垂直居中偏移 */
    font-size: 40px;
    cursor: pointer;
    color: #808083;
    line-height: 1;
    transition: color 0.2s;
}

    .subscribe-modal .close-btn:hover {
        color: #0b90c7;
    }

.subscribe-modal .modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.subscribe-modal .modal-subtitle {
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

.subscribe-modal .modal-title,
.subscribe-modal .modal-subtitle {
    width: 100%;
    text-align: center;
    word-break: break-word;
    white-space: normal;
}

/* 如果标题太长，可以限制最大宽度 */
.subscribe-modal .modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: transparent; /* 保持透明，让背景图露出 */
    border-bottom: none; /* 如果有边框可去掉 */
}

.subscribe-modal .form-group {
    margin-bottom: 20px;
}

.subscribe-modal .form-control {
    width: 100%;
    box-sizing: border-box; /* 新增这行，防止宽度溢出 */
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 40px;
    transition: 0.2s;
}

    .subscribe-modal .form-control:focus {
        outline: none;
        border-color: #0b90c7;
        box-shadow: 0 0 0 2px rgba(40,195,197,0.2);
    }

.subscribe-modal select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%235f7a7c" stroke-width="2"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.subscribe-modal .btn-subscribe {
    width: 100%;
    background: #000000;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

    .subscribe-modal .btn-subscribe:hover {
        background: #1e9b9d;
    }

.subscribe-modal .legal-text {
    font-size: 16px;
    text-align: center;
    margin-top: 20px;
}

.subscribe-modal .form-message {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
}

    .subscribe-modal .form-message.error {
        color: #e74c3c;
    }

    .subscribe-modal .form-message.success {
        color: #0b90c7;
    }


.subscribe-modal-overlay,
.floating-btn-right {
    display: none !important;
}