/* Layer弹窗库样式 */

.layer-shade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 19891013;
}

.layer-container {
    position: fixed;
    z-index: 19891014;
    animation: layer-fadeIn 0.3s ease-out;
}

@keyframes layer-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.layer-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 90%;
    overflow: hidden;
}

/* 消息提示专用样式（无标题和按钮时） */
.layer-msg-container .layer-content {
    min-width: auto;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.layer-msg-container .layer-body {
    padding: 0;
}

.layer-title {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
}

.layer-body {
    padding: 20px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
}

.layer-prompt-body {
    padding: 4px 0;
}

.layer-prompt-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
    font-size: 14px;
    color: #1f2329;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.layer-prompt-input:focus {
    border-color: #0052d9;
    box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.1);
}

textarea.layer-prompt-input {
    min-height: 88px;
    resize: vertical;
    line-height: 1.5;
}

.layer-footer {
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.layer-btn {
    padding: 8px 20px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    color: #374151;
    min-width: 80px;
}

.layer-btn-primary {
    background: #0052d9;
    color: #fff;
    border-color: #0052d9;
}

.layer-btn-primary:hover {
    background: #0034a5;
    border-color: #0034a5;
}

.layer-btn-default:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.layer-btn:active {
    transform: scale(0.98);
}

/* 消息提示样式优化 */
.layer-msg-content {
    text-align: center;
    padding: 32px 40px;
    min-width: 200px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.layer-msg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    line-height: 1;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
    animation: layer-icon-bounce 0.5s ease-out;
    flex-shrink: 0;
}

.layer-msg-icon-success {
    background: #f0f9ff;
    color: #10b981;
    border: 2px solid #10b981;
}

.layer-msg-icon-error {
    background: #fef2f2;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.layer-msg-icon-warning {
    background: #fffbeb;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.layer-msg-icon-info {
    background: #eff6ff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.layer-msg-text {
    font-size: 15px;
    color: #1f2329;
    line-height: 1.6;
    margin-top: 0;
    word-break: break-word;
    font-weight: 400;
    max-width: 100%;
}

/* 消息提示图标动画 */
@keyframes layer-icon-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 消息提示容器动画优化 */
.layer-msg-container {
    animation: layer-msg-fadeIn 0.3s ease-out;
}

@keyframes layer-msg-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 消息提示淡出动画 */
.layer-msg-container.layer-msg-fadeOut {
    animation: layer-msg-fadeOut 0.2s ease-in forwards;
}

@keyframes layer-msg-fadeOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .layer-content {
        min-width: 280px;
        max-width: 95%;
    }

    .layer-title {
        padding: 12px 16px;
        font-size: 15px;
    }

    .layer-body {
        padding: 16px;
        font-size: 13px;
    }

    .layer-footer {
        padding: 10px 16px;
        flex-direction: column;
    }

    .layer-btn {
        width: 100%;
    }

    .layer-msg-container .layer-content {
        max-width: 90%;
    }

    .layer-msg-content {
        padding: 24px 28px;
        min-width: 160px;
    }

    .layer-msg-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 12px;
    }

    .layer-msg-text {
        font-size: 14px;
    }
}
