/**
 * TPP Gated Content - Frontend CSS
 * 受控内容发布模块 - 前端样式
 *
 * 设计原则：继承 Kadence 主题风格，不使用紫色/靛蓝色系
 */

/* ===== 锁定表单容器 ===== */
.tpp-gated-lock {
    margin: 32px 0;
    padding: 32px 32px 28px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tpp-gated-lock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c5f8d, #4a90c2, #2c5f8d);
}

.tpp-gated-lock-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tpp-gated-lock-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5f8d;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tpp-gated-lock-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    line-height: 1.3;
}

.tpp-gated-lock-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ===== 表单 ===== */
.tpp-gated-form {
    text-align: left;
}

.tpp-gated-field {
    margin-bottom: 12px;
}

.tpp-gated-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tpp-gated-field input:focus {
    outline: none;
    border-color: #2c5f8d;
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.tpp-gated-field input::placeholder {
    color: #adb5bd;
}

/* ===== 提交按钮 ===== */
.tpp-gated-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2c5f8d 0%, #1e4a6e 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    margin-top: 8px;
}

.tpp-gated-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.3);
}

.tpp-gated-submit:active {
    transform: translateY(0);
}

.tpp-gated-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tpp-gated-submit-loading {
    display: inline-block;
}

/* ===== 错误提示 ===== */
.tpp-gated-error {
    color: #dc3545;
    font-size: 13px;
    margin: 8px 0 0;
    text-align: center;
}

/* ===== 隐私提示 ===== */
.tpp-gated-privacy {
    font-size: 12px;
    color: #adb5bd;
    margin: 14px 0 0;
    text-align: center;
}

/* ===== 解锁提示短代码 [tpp_gated_hint] ===== */
.tpp-gated-hint {
    margin: 16px 0;
    padding: 12px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffa726;
    border-radius: 6px;
    color: #795548;
    font-size: 14px;
    line-height: 1.6;
}
.tpp-gated-hint p {
    margin: 0;
}

/* ===== Forminator 表单：完全原生，不做任何覆盖 ===== */
/* 表单内部元素（输入框、按钮、Phone 组合框等）全部使用 Forminator 默认样式 */
/* 只在外层 .tpp-gated-lock 提供卡片容器 */

/* ===== 下载链接框（已解锁后显示） ===== */
.tpp-gated-download-box {
    margin: 32px 0;
    padding: 24px;
    background: #f0f7f0;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tpp-gated-download-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #155724;
}

.tpp-gated-download-info svg {
    flex-shrink: 0;
}

.tpp-gated-download-info div {
    display: flex;
    flex-direction: column;
}

.tpp-gated-download-info strong {
    font-size: 15px;
}

.tpp-gated-download-info span {
    font-size: 12px;
    color: #6c757d;
}

.tpp-gated-download-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #28a745;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.tpp-gated-download-btn:hover {
    background: #218838;
}

/* ===== Honeypot 隐藏 ===== */
.tpp-gated-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .tpp-gated-lock {
        padding: 24px 16px 20px;
        margin: 20px 0;
    }
    .tpp-gated-lock-title {
        font-size: 18px;
    }
    .tpp-gated-download-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .tpp-gated-download-btn {
        width: 100%;
        text-align: center;
    }
}
