/* ============================================================
   YSF 云枢框架 — UI 组件库样式
   ============================================================ */

:root {
    --ysf-primary: #165dff;
    --ysf-primary-dark: #0e4ad4;
    --ysf-success: #16a34a;
    --ysf-error: #dc2626;
    --ysf-warning: #d97706;
    --ysf-info: #2563eb;
}

/* ============================================================
   Toast 通知条
   ============================================================ */

.ysf-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 99999;
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    white-space: nowrap;
    text-align: center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.ysf-toast.show {
    opacity: 0.92;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.ysf-toast.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    pointer-events: none;
}

.ysf-toast-success {
    background-color: rgba(22, 163, 74, 0.85);
    color: #ffffff;
}

.ysf-toast-error {
    background-color: rgba(220, 38, 38, 0.85);
    color: #ffffff;
}

/* ============================================================
   Confirm 确认弹窗
   ============================================================ */

.ysf-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    align-items: center;
    justify-content: center;
}

.ysf-confirm-box {
    background: #ffffff;
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 0;
}

.ysf-confirm-msg {
    margin: 0 0 20px;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
}

.ysf-confirm-actions {
    text-align: right;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ysf-confirm-btn {
    padding: 6px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: 0;
    line-height: 1.5;
    transition: background-color 0.15s, border-color 0.15s;
}

.ysf-confirm-cancel {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

.ysf-confirm-cancel:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.ysf-confirm-ok {
    background-color: var(--ysf-primary);
    border-color: var(--ysf-primary);
    color: #ffffff;
}

.ysf-confirm-ok:hover {
    background-color: var(--ysf-primary-dark);
    border-color: var(--ysf-primary-dark);
}

/* ============================================================
   Alert 横幅提示
   ============================================================ */

.ysf-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
}

.ysf-alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ysf-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.ysf-alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ysf-alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.ysf-alert-text {
    flex: 1;
    margin-right: 12px;
}

.ysf-alert-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.ysf-alert-close:hover {
    opacity: 1;
}

/* ============================================================
   Modal 通用弹窗
   ============================================================ */

.ysf-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99997;
    align-items: center;
    justify-content: center;
}

.ysf-modal-box {
    background: #ffffff;
    max-width: 90vw;
    max-height: 85vh;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ysf-modal-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.ysf-modal-content {
    padding: 24px;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
    overflow-y: auto;
    flex: 1;
}

.ysf-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.ysf-modal-btn {
    padding: 6px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: 0;
    line-height: 1.5;
    transition: background-color 0.15s, border-color 0.15s;
}

.ysf-modal-btn-primary {
    background-color: var(--ysf-primary);
    border-color: var(--ysf-primary);
    color: #ffffff;
}

.ysf-modal-btn-primary:hover {
    background-color: var(--ysf-primary-dark);
    border-color: var(--ysf-primary-dark);
}

.ysf-modal-btn-default {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

.ysf-modal-btn-default:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

/* ============================================================
   Notify 右下角通知
   ============================================================ */

.ysf-notify-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.ysf-notify-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    pointer-events: auto;
    transform: translateX(calc(100% + 24px));
    transition: transform 0.3s ease;
    max-width: 360px;
}

.ysf-notify-item.ysf-notify-show {
    transform: translateX(0);
}

.ysf-notify-item.ysf-notify-hide {
    transform: translateX(calc(100% + 24px));
}

.ysf-notify-item i {
    font-size: 18px;
    flex-shrink: 0;
    margin-right: 8px;
}

.ysf-notify-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
