﻿/* ═══════════════════════════════════════════════
   KKPro Uploader — Styles
   ═══════════════════════════════════════════════ */

/* ── Overlay ── */
.kkpro-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: kkpro-fade-in 0.18s ease;
}

@keyframes kkpro-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Popup box ── */
.kkpro-popup {
    background: #1e2130;
    border-radius: 16px;
    width: 520px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    animation: kkpro-slide-up 0.22s cubic-bezier(0.34,1.56,0.64,1);
    overflow: hidden;
}

@keyframes kkpro-slide-up {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Header ── */
.kkpro-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.kkpro-popup-title {
    font-size: 15px;
    font-weight: 700;
    color: #e8eaf0;
}

.kkpro-popup-close {
    font-size: 22px;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

    .kkpro-popup-close:hover {
        color: #fff;
    }

/* ── Steps indicator ── */
.kkpro-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px 10px;
    gap: 0;
}

.kkpro-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: #2d3148;
    color: #666;
    border: 2px solid #3a3f5c;
    transition: all 0.25s;
    flex-shrink: 0;
}

    .kkpro-step.active {
        background: var(--kk-color-2, #4a90d9);
        color: #fff;
        border-color: var(--kk-color-2, #4a90d9);
        box-shadow: 0 0 0 4px rgba(74,144,217,0.2);
    }

    .kkpro-step.done {
        background: #27ae60;
        color: #fff;
        border-color: #27ae60;
    }

.kkpro-step-line {
    flex: 1;
    height: 2px;
    background: #3a3f5c;
    max-width: 60px;
    transition: background 0.25s;
}

    .kkpro-step-line.done {
        background: #27ae60;
    }

/* ── Step 1: نوع آپلود ── */
.kkpro-step1-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px 24px;
}

.kkpro-type-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #252840;
    border: 1.5px solid #3a3f5c;
    border-radius: 12px;
    color: #c8ccd8;
    cursor: pointer;
    transition: all 0.18s;
    text-align: right;
    direction: rtl;
}

    .kkpro-type-btn:hover {
        background: #2d3250;
        border-color: var(--kk-color-2, #4a90d9);
        color: #fff;
        transform: translateX(-2px);
    }

    .kkpro-type-btn i {
        font-size: 22px;
        color: var(--kk-color-2, #4a90d9);
        flex-shrink: 0;
    }

    .kkpro-type-btn span {
        font-size: 14px;
        font-weight: 600;
        flex: 1;
    }

    .kkpro-type-btn small {
        font-size: 11px;
        color: #666;
    }

/* ── Step 2: فایل‌ها + drag ── */
.kkpro-step2-body {
    padding: 12px 22px;
    overflow-y: auto;
    max-height: 360px;
    flex: 1;
}

.kkpro-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kkpro-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #252840;
    border: 1.5px solid #3a3f5c;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.15s;
    user-select: none;
    direction: rtl;
}

    .kkpro-file-row:hover {
        background: #2d3250;
        border-color: #4a6fa5;
    }

    .kkpro-file-row.drag-over {
        border-color: var(--kk-color-2, #4a90d9);
        background: rgba(74,144,217,0.1);
        transform: scale(1.01);
    }

    .kkpro-file-row:active {
        cursor: grabbing;
    }

/* ── File preview thumbnail ── */
.kkpro-file-preview {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1d2e;
}

    .kkpro-file-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .kkpro-file-preview.small {
        width: 40px;
        height: 40px;
    }

.kkpro-file-ext-badge {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    border-radius: 8px;
}

    .kkpro-file-ext-badge.small {
        font-size: 9px;
        border-radius: 6px;
    }

/* ── File name ── */
.kkpro-file-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    min-width: 0;
}

    .kkpro-file-name span {
        font-size: 13px;
        color: #d0d4e0;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kkpro-file-name small {
        font-size: 11px;
        color: #666;
    }

/* ── Drag handle ── */
.kkpro-drag-handle {
    color: #4a5068;
    font-size: 18px;
    cursor: grab;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}

    .kkpro-drag-handle:hover {
        color: #888;
    }

/* ── Step 3: اطلاعات تکمیلی ── */
.kkpro-step3-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kkpro-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    direction: rtl;
}

    .kkpro-input-group label {
        font-size: 13px;
        font-weight: 600;
        color: #9aa0b8;
    }

.kkpro-input {
    background: #252840;
    border: 1.5px solid #3a3f5c;
    border-radius: 8px;
    padding: 10px 14px;
    color: #e0e4f0;
    font-size: 14px;
    direction: rtl;
    transition: border-color 0.18s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

    .kkpro-input:focus {
        border-color: var(--kk-color-2, #4a90d9);
    }

    .kkpro-input::placeholder {
        color: #555;
    }

.kkpro-step3-note {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    margin: 0;
}

/* ── Step 4: Progress ── */
.kkpro-step4-body {
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    max-height: 420px;
    flex: 1;
}

/* Overall progress */
.kkpro-overall-progress-box {
    background: #252840;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #3a3f5c;
}

.kkpro-overall-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #9aa0b8;
    margin-bottom: 8px;
    direction: rtl;
}

.kkpro-overall-percent {
    text-align: left;
    font-size: 18px;
    font-weight: 800;
    color: var(--kk-color-2, #4a90d9);
    margin-top: 6px;
}

/* Progress track */
.kkpro-progress-track {
    height: 6px;
    background: #1a1d2e;
    border-radius: 99px;
    overflow: hidden;
}

.kkpro-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--kk-color-2, #4a90d9);
    transition: width 0.08s linear;
}

    .kkpro-progress-fill.overall {
        background: linear-gradient(90deg, #4a90d9, #27ae60);
    }

    .kkpro-progress-fill.done {
        background: #27ae60;
    }

    .kkpro-progress-fill.error {
        background: #e74c3c;
    }

/* Upload list */
.kkpro-upload-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kkpro-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #252840;
    border: 1px solid #3a3f5c;
    border-radius: 10px;
    padding: 10px 12px;
    direction: rtl;
}

.kkpro-upload-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.kkpro-upload-name {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #d0d4e0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kkpro-upload-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── Footer buttons ── */
.kkpro-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
    direction: rtl;
}

.kkpro-btn-primary {
    background: var(--kk-color-2, #4a90d9);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .kkpro-btn-primary:hover {
        background: #3a7fc9;
        transform: translateY(-1px);
    }

    .kkpro-btn-primary:active {
        transform: translateY(0);
    }

.kkpro-btn-secondary {
    background: transparent;
    color: #888;
    border: 1.5px solid #3a3f5c;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.18s;
}

    .kkpro-btn-secondary:hover {
        border-color: #666;
        color: #ccc;
    }

/* ── Spin animation برای آیکون در حال آپلود ── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 0.8s linear infinite;
}

/* ── Scrollbar ── */
.kkpro-step2-body::-webkit-scrollbar,
.kkpro-step4-body::-webkit-scrollbar {
    width: 4px;
}

.kkpro-step2-body::-webkit-scrollbar-track,
.kkpro-step4-body::-webkit-scrollbar-track {
    background: transparent;
}

.kkpro-step2-body::-webkit-scrollbar-thumb,
.kkpro-step4-body::-webkit-scrollbar-thumb {
    background: #3a3f5c;
    border-radius: 99px;
}
