/* Popup Component Styles - 弹窗组件样式 */

/* 弹窗容器 - 覆盖整个屏幕 */
.site-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-m);
    box-sizing: border-box;
    overflow-y: auto;
}

/* 弹窗内容容器 */
.site-popup-content {
    background-color: #fff;
    margin: 0;
    max-width: 100%;
    overflow-y: auto;
    padding: 30px;
    z-index: 1;
    pointer-events: auto;
    border-color: var(--black-trans-10);
    border-radius: 15px;
    box-shadow: 3px 3px 5px 3px var(--black-trans-20);
    position: relative;
    max-height: 90vh;
    animation: popupFadeIn 0.3s ease;
}

/* 特定弹窗 ID 的样式 */
.site-popup.popup-52 .site-popup-content {
    width: 40%;
    max-width: 600px;
}

/* 响应式：移动端宽度调整 */
@media (max-width: 991px) {
    .site-popup.popup-52 .site-popup-content {
        width: 90%;
    }
}

@media (max-width: 767px) {
    .site-popup.popup-52 .site-popup-content {
        width: 95%;
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 弹窗内容区域 */
.popup1.site-section {
    padding-top: var(--space-s);
    padding-bottom: var(--space-s);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--container-gap);
}

/* 弹窗容器 */
.popup1__container.site-container {
    position: relative;
    width: 100%;
    column-gap: var(--space-xs);
}

/* 标题块 */
.popup1__tblock.site-block {
    justify-items: space-between;
    justify-content: space-between;
    flex-direction: row;
    display: flex;
    align-items: center;
    margin-bottom: var(--space-m);
    gap: var(--content-gap);
}

.popup1-title.site-heading {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0;
    color: var(--black);
}

/* 关闭按钮 */
.popup1-close.site-icon {
    font-size: 30px;
    text-align: right;
    position: absolute;
    right: 0px;
    top: 0px;
    cursor: pointer;
    margin-top: 0;
    color: var(--black);
    transition: color 0.3s ease;
    z-index: 10;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.popup1-close.site-icon:hover {
    color: var(--primary);
}

/* 表单块 */
.popup1__fblock.site-block {
    /* margin-top: var(--space-m); */
    gap: var(--content-gap);
    width: 100%;
    display: flex;
    justify-content: center;
}

/* 短代码容器 */
.site-shortcode {
    width: 90%;
    margin: 0 auto;
}

/* Form Styles */
.flufrom__container.site-container {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.fluform__block.site-block {
    width: 100%;
}

.fluentform {
    width: 100%;
}

.ff-el-group {
    margin-bottom: var(--space-m);
}

.ff-el-input--label {
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--black);
    position: relative;
}

.ff-el-input--label label {
    display: block;
    font-size: var(--text-m);
}

/* 必填字段标签右上角红色星号 */
.ff-el-input--label.asterisk-right.ff-el-is-required label::after {
    content: '*';
    color: #dc3545;
    font-size: var(--text-m);
    margin-left: 4px;
    font-weight: bold;
}

.ff-el-input--content input,
.ff-el-input--content textarea {
    width: 100%;
    padding: var(--space-xs) var(--space-s);
    border: 1px solid var(--black-trans-20);
    border-radius: var(--radius-m, 5px);
    font-size: var(--text-m);
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ff-el-input--content input:focus,
.ff-el-input--content textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.ff-el-input--content textarea {
    resize: vertical;
    min-height: 120px;
}

.ff_file_upload_holder {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* 隐藏文件上传 input，但保留功能 */
.ff_file_upload_holder input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    opacity: 0;
    pointer-events: none;
}

.ff_upload_btn {
    padding: var(--space-xs) var(--space-s);
    background-color: var(--tertiary);
    border: 1px solid var(--black-trans-20);
    border-radius: var(--radius-m, 5px);
    cursor: pointer;
    font-size: var(--text-m);
    transition: background-color 0.3s ease;
}

.ff_upload_btn:hover {
    background-color: var(--tertiary-dark);
}

.ff-btn-submit {
    padding: var(--space-xs) var(--space-l);
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-m, 5px);
    font-size: var(--text-m);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ff-btn-submit:hover {
    background-color: var(--primary-hover);
}

.ff-errors-in-stack {
    margin-top: var(--space-m);
    color: #dc3545;
    font-size: var(--text-s);
}

/* Responsive */
@media (max-width: 767px) {
    .site-popup {
        padding: var(--space-s);
    }
    
    .popup1.site-section {
        padding: var(--space-m);
    }
    
    .popup1-title.site-heading {
        font-size: var(--text-l);
    }
}
