.king-img-attach-card{border:1px solid #dcdcde;border-radius:10px;background:#fff;max-width:520px;padding:12px 12px 10px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.king-img-attach-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.king-img-attach-title{font-weight:600;font-size:13px;letter-spacing:.2px}
.king-img-attach-badges{display:flex;gap:6px;align-items:center}
.king-img-attach-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:600}
.king-img-attach-badge--optimized{background:#edfaef;color:#1e7b34;border:1px solid #bfe7c8}
.king-img-attach-badge--pending{background:#f0f6ff;color:#0a4ea3;border:1px solid #c7dcff}
.king-img-attach-body{display:grid;gap:6px;margin:8px 0 10px}
.king-img-attach-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.king-img-attach-k{color:#50575e;font-size:12px}
.king-img-attach-v{font-size:12px;font-weight:600}
.king-img-attach-v--good{color:#1e7b34}
.king-img-attach-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.king-img-attach-msg{font-size:12px;color:#50575e}
.king-img-attach-spinner{visibility:hidden;margin:0}
.king-img-attach-card.is-busy .king-img-attach-spinner{visibility:visible}

/* Upload auto-optimize toast */
.king-img-toast{position:fixed;right:18px;bottom:18px;z-index:9999999;width:340px;max-width:calc(100vw - 36px);border:1px solid #dcdcde;border-radius:14px;background:#fff;box-shadow:0 10px 30px rgba(0,0,0,.18);padding:12px}
.king-img-toast-head{display:flex;align-items:center;gap:10px}
.king-img-toast-icon{font-size:18px;line-height:18px;width:18px;height:18px;color:#2271b1}
.king-img-toast-title{font-weight:700;font-size:13px;color:#1d2327;flex:1}
.king-img-toast-close{appearance:none;border:0;background:transparent;color:#646970;font-size:18px;line-height:18px;cursor:pointer;padding:2px 6px;border-radius:8px}
.king-img-toast-close:hover{background:rgba(0,0,0,.06)}
.king-img-toast-body{margin-top:10px;display:grid;gap:8px}
.king-img-toast-line{font-size:12px;color:#50575e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.king-img-toast-meta{font-size:11px;color:#646970}
.king-img-toast-bar{height:8px;background:#f0f0f1;border-radius:999px;overflow:hidden}
.king-img-toast-bar-fill{height:100%;background:#2271b1;border-radius:999px;width:0%}

.king-img-toast.is-success .king-img-toast-icon{color:#1e7b34}
.king-img-toast.is-success .king-img-toast-bar-fill{background:#1e7b34}
.king-img-toast.is-warning .king-img-toast-icon{color:#b54708}
.king-img-toast.is-warning .king-img-toast-bar-fill{background:#b54708}
.king-img-toast.is-error .king-img-toast-icon{color:#d63638}
.king-img-toast.is-error .king-img-toast-bar-fill{background:#d63638}

@keyframes kingImgSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.king-img-toast .dashicons-update{animation:kingImgSpin 1s linear infinite}
.king-img-toast.is-success .dashicons-update,.king-img-toast.is-warning .dashicons-update,.king-img-toast.is-error .dashicons-update{animation:none}

@media (prefers-color-scheme: dark){body.admin-color-fresh .king-img-attach-card{background:#1d2327;border-color:#2c3338;box-shadow:none}body.admin-color-fresh .king-img-attach-k,body.admin-color-fresh .king-img-attach-msg{color:#a7aaad}body.admin-color-fresh .king-img-attach-title,body.admin-color-fresh .king-img-attach-v{color:#f0f0f1}}

@media (prefers-color-scheme: dark){body.admin-color-fresh .king-img-toast{background:#1d2327;border-color:#2c3338;box-shadow:none}body.admin-color-fresh .king-img-toast-title{color:#f0f0f1}body.admin-color-fresh .king-img-toast-line,body.admin-color-fresh .king-img-toast-meta{color:#a7aaad}body.admin-color-fresh .king-img-toast-bar{background:#2c3338}body.admin-color-fresh .king-img-toast-close:hover{background:rgba(255,255,255,.08)}}
