/**
 * 精美的弹出层样式
 */

/* Toast 提示框容器 */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: auto;
}

/* Toast 提示框 */
.toast {
    background: var(--bg-primary, #FFFFFF);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-xl, 0 8px 24px rgba(0, 0, 0, 0.15));
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    border-left: 4px solid;
    min-width: 280px;
    max-width: 100%;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-lg, 16px) var(--spacing-xl, 20px);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success {
    border-left-color: var(--success-color, #52c41a);
    background: linear-gradient(135deg, #f6ffed 0%, #ffffff 100%);
}

.toast-success .toast-icon {
    color: var(--success-color, #52c41a);
}

.toast-error {
    border-left-color: var(--error-color, #ff4d4f);
    background: linear-gradient(135deg, #fff2f0 0%, #ffffff 100%);
}

.toast-error .toast-icon {
    color: var(--error-color, #ff4d4f);
}

.toast-warning {
    border-left-color: var(--warning-color, #faad14);
    background: linear-gradient(135deg, #fffbe6 0%, #ffffff 100%);
}

.toast-warning .toast-icon {
    color: var(--warning-color, #faad14);
}

.toast-info {
    border-left-color: var(--info-color, #1890ff);
    background: linear-gradient(135deg, #e6f7ff 0%, #ffffff 100%);
}

.toast-info .toast-icon {
    color: var(--info-color, #1890ff);
}

/* 使用主题色的toast */
.toast-primary {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--bg-primary) 100%);
}

.toast-primary .toast-icon {
    color: var(--primary-color);
}

.toast-message {
    flex: 1;
    font-size: var(--font-size-sm, 14px);
    color: var(--text-primary, #1a1a1a);
    line-height: 1.5;
    word-break: break-word;
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 768px) {
    #toast-container {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* Modal 对话框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: var(--white, #FFFFFF);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

.modal-icon-success {
    background: #f6ffed;
    color: #52c41a;
}

.modal-icon-error {
    background: #fff2f0;
    color: #ff4d4f;
}

.modal-icon-warning {
    background: #fffbe6;
    color: #faad14;
}

.modal-icon-info {
    background: #e6f7ff;
    color: #1890ff;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark, #333333);
    margin: 0;
}

.modal-body {
    padding: 0 24px 24px;
    text-align: center;
}

.modal-message {
    font-size: 14px;
    color: var(--gray, #777777);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.modal-btn-cancel {
    background: var(--light-gray, #F5F5F5);
    color: var(--dark, #333333);
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-confirm {
    background: var(--primary, #FF7A50);
    color: white;
}

.modal-btn-confirm:hover {
    background: #FF6B3D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 122, 80, 0.3);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    margin-top: 12px;
    border: 2px solid var(--light-gray, #E5E7EB);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: var(--primary, #FF7A50);
    box-shadow: 0 0 0 3px rgba(255, 122, 80, 0.1);
}

.modal-input::placeholder {
    color: var(--gray, #999999);
}

/* 响应式 */
@media (max-width: 480px) {
    .modal-container {
        max-width: 90%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 20px 12px;
    }
    
    .modal-body {
        padding: 0 20px 20px;
    }
    
    .modal-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

