/* 发布确认弹窗样式 */

/* 发布弹窗遮罩层 */
._publish-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

/* 发布弹窗主体 */
._publish-modal-main {
    width: 95%;
    max-width: 500px;
    /*max-width: 400px;*/
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

/* 弹窗激活状态 - 平滑出现 */
._publish-modal-mask._publish-modal-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

._publish-modal-mask._publish-modal-active ._publish-modal-main {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 弹窗内容区域 */
._publish-modal-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 图片预览区域 */
._publish-modal-image-preview {
    /*height: 240px;*/
    height: 360px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f2f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

._publish-modal-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 开关控件区域 */
._publish-modal-switch-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

._publish-modal-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

._publish-modal-switch-label {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
}

/* iPhone风格开关 */
._publish-modal-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

._publish-modal-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

._publish-modal-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}

._publish-modal-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + ._publish-modal-slider {
    /*background-color: #2f80ed;*/
    background-color: var(--theme-color);
}

input:checked + ._publish-modal-slider:before {
    transform: translateX(26px);
}

/* 提示词预览区域 */
._publish-modal-prompt-preview {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    max-height: 120px;
    overflow-y: auto;
    transition: all 0.4s ease;
    opacity: 1;
}

._publish-modal-prompt-preview._publish-modal-disabled {
    opacity: 0.3;
    background: #f0f0f0;
}

._publish-modal-prompt-preview-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

._publish-modal-prompt-preview-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
    transition: opacity 0.4s ease;
}

/* 按钮区域 */
._publish-modal-actions {
    display: flex;
    gap: 16px;
    padding: 20px 30px 30px;
    border-top: 1px solid #f0f0f0;
}

._publish-modal-btn {
    flex: 1;
    height: 48px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

._publish-modal-btn i {
    font-size: 12px;
}

._publish-modal-btn-cancel {
    background-color: var(--sub-btn-bg);
    color: var(--sub-btn-text-color);
}

._publish-modal-btn-cancel:hover {
    /*background-color: #e9ecef;*/
    transform: translateY(-2px);
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);*/
}

._publish-modal-btn-confirm {
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text-color);
}

._publish-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--theme-color-0-2);
}

._publish-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 弹窗消失动画 */
._publish-modal-mask._publish-modal-closing {
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0);
}

._publish-modal-mask._publish-modal-closing ._publish-modal-main {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
}

/* 图片加载动画 */
._publish-modal-preview-image._publish-modal-loading {
    opacity: 0;
}

._publish-modal-preview-image._publish-modal-loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    ._publish-modal-main {
        width: 92%;
        max-width: 400px;
    }

    ._publish-modal-content {
        padding: 24px;
        gap: 20px;
    }

    ._publish-modal-image-preview {
        /*height: 200px;*/
        height: 360px;
    }

    ._publish-modal-actions {
        padding: 16px 24px 24px;
        gap: 12px;
    }

    ._publish-modal-btn {
        height: 44px;
        font-size: 14px;
    }

    ._publish-modal-switch-label {
        font-size: 15px;
    }

    ._publish-modal-prompt-preview {
        max-height: 100px;
    }
}

@media (max-width: 480px) {
    ._publish-modal-main {
        width: 94%;
        /*max-width: 360px;*/
    }

    ._publish-modal-content {
        padding: 20px;
        gap: 16px;
    }

    ._publish-modal-image-preview {
        /*height: 180px;*/
        height: 360px;
    }

    ._publish-modal-actions {
        padding: 12px 20px 20px;
        gap: 10px;
    }

    ._publish-modal-btn {
        height: 42px;
        font-size: 13px;
    }

    ._publish-modal-prompt-preview {
        max-height: 90px;
        padding: 12px;
    }
}