/* ===================================================
   Job Manager UI — Snackbar + Indicator 하이브리드
   생성 중: Indicator 배지 / 완료: Snackbar + 갤러리 하이라이트
   =================================================== */

/* === Floating Indicator (생성 중 배지) === */
.job-indicator {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: none;
    pointer-events: auto;
}

.job-indicator.visible {
    display: block;
    animation: jobIndicatorIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes jobIndicatorIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.job-indicator-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(30, 26, 46, 0.95), rgba(42, 35, 66, 0.95));
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    cursor: default;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 200px;
    transition: all 0.3s ease;
}

.job-indicator-badge:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.job-indicator-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(167, 139, 250, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: jobSpin 0.9s linear infinite;
    flex-shrink: 0;
}

@keyframes jobSpin {
    to { transform: rotate(360deg); }
}

.job-indicator-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.job-indicator-label {
    font-size: 0.78rem;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-indicator-status {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.job-indicator-timer {
    font-size: 0.68rem;
    color: rgba(167, 139, 250, 0.65);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    font-weight: 500;
}

/* === Snackbar (완료/실패 — 하단 중앙 1줄 바) === */
.job-snackbar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 0 16px 20px;
}

.job-snackbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 14px;
    background: linear-gradient(135deg, rgba(30, 26, 46, 0.97), rgba(42, 35, 66, 0.97));
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.1);
    max-width: 520px;
    width: 100%;
    pointer-events: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.job-snackbar.show {
    transform: translateY(0);
    opacity: 1;
}

.job-snackbar.hiding {
    transform: translateY(100%);
    opacity: 0;
}

/* 미니 썸네일 */
.job-snackbar-thumb {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(167, 139, 250, 0.3);
    background: rgba(167, 139, 250, 0.1);
    flex-shrink: 0;
}

/* 썸네일 없을 때 아이콘 */
.job-snackbar-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.job-snackbar-icon.success {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.job-snackbar-icon.error {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.job-snackbar-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.job-snackbar-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-snackbar-message {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 액션 버튼 */
.job-snackbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.job-snackbar-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    line-height: 1.3;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.job-snackbar-btn.primary {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.job-snackbar-btn.primary:hover {
    background: linear-gradient(135deg, #b9a3fb, #8b5cf6);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.job-snackbar-btn.primary:active {
    transform: translateY(0);
}

.job-snackbar-close {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.job-snackbar-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* === 갤러리 Glow 하이라이트 === */
@keyframes galleryItemGlow {
    0%   { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.6); }
    40%  { box-shadow: 0 0 16px 4px rgba(167, 139, 250, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

.gallery-item.job-new-highlight {
    animation: galleryItemGlow 2s ease-out 2;
    border: 2px solid rgba(167, 139, 250, 0.5) !important;
    position: relative;
}

.gallery-item.job-new-highlight::after {
    content: 'NEW';
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    z-index: 5;
    pointer-events: none;
}

/* === 반응형 === */
@media (max-width: 480px) {
    .job-indicator {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: none;
    }
    .job-indicator-badge {
        min-width: unset;
        border-radius: 14px;
    }
    .job-snackbar-container {
        padding: 0 8px 12px;
    }
    .job-snackbar {
        max-width: unset;
        border-radius: 12px;
        gap: 10px;
        padding: 8px 10px;
    }
    .job-snackbar-thumb {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
}
