/**
 * Dokan Vendor Credits File Upload Styles
 * Modern drag-and-drop interface with progress indicators
 */

/* Upload Container */
.dvc-upload-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Upload Zone */
.dvc-upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dvc-upload-zone:hover {
    border-color: #e67e14;
    background: #fff5f0;
}

.dvc-upload-zone.dvc-drag-over {
    border-color: #e67e14;
    background: #fff5f0;
    transform: scale(1.02);
}

.dvc-upload-zone-content {
    position: relative;
    z-index: 2;
}

.dvc-upload-icon {
    font-size: 28px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.dvc-upload-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.dvc-upload-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
}

.dvc-upload-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 11px;
    color: #888;
    flex-wrap: wrap;
}

.dvc-max-size,
.dvc-allowed-types {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dvc-max-size::before {
    content: "📏";
}

.dvc-allowed-types::before {
    content: "📋";
}

/* File List */
.dvc-file-list {
    margin-top: 20px;
}

.dvc-file-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.dvc-file-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* File Item */
.dvc-file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.dvc-file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dvc-file-item.dvc-file-uploading {
    background: #f8f9fa;
    border-color: #007cba;
}

.dvc-file-item.dvc-file-uploaded {
    background: #f0f8f0;
    border-color: #4caf50;
}

.dvc-file-item.dvc-file-error {
    background: #fff5f5;
    border-color: #f44336;
}

/* File Preview */
.dvc-file-preview {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

/* File Info */
.dvc-file-info {
    flex: 1;
    min-width: 0;
}

.dvc-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dvc-file-size {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
}

.dvc-file-status {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
}

.dvc-file-item.dvc-file-uploading .dvc-file-status {
    color: #007cba;
}

.dvc-file-item.dvc-file-uploaded .dvc-file-status {
    color: #4caf50;
}

.dvc-file-item.dvc-file-error .dvc-file-status {
    color: #f44336;
}

/* File Actions */
.dvc-file-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.dvc-file-actions button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dvc-file-actions button:hover {
    background: #f5f5f5;
}

.dvc-btn-cancel {
    background: #fff !important;
    border-color: #f44336 !important;
    color: #f44336 !important;
}

.dvc-btn-cancel:hover {
    background: #ffebee !important;
}

.dvc-btn-view {
    background: #e3f2fd !important;
    border-color: #2196f3 !important;
    color: #2196f3 !important;
}

.dvc-btn-view:hover {
    background: #bbdefb !important;
}

.dvc-btn-delete,
.dvc-btn-remove {
    background: #ffebee !important;
    border-color: #f44336 !important;
    color: #f44336 !important;
}

.dvc-btn-delete:hover,
.dvc-btn-remove:hover {
    background: #ffcdd2 !important;
}

.dvc-btn-retry {
    background: #fff3e0 !important;
    border-color: #ff9800 !important;
    color: #ff9800 !important;
}

.dvc-btn-retry:hover {
    background: #ffe0b2 !important;
}

/* Progress Bar */
.dvc-file-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e5e5e5;
    overflow: hidden;
}

.dvc-progress-bar {
    height: 100%;
    background: #007cba;
    position: relative;
}

.dvc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba, #00a0d2);
    transition: width 0.3s ease;
    position: relative;
}

.dvc-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 1.5s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.dvc-progress-text {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

/* Notifications */
.dvc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.dvc-notification-success {
    background: #4caf50;
    color: white;
}

.dvc-notification-error {
    background: #f44336;
    color: white;
}

.dvc-notification-info {
    background: #2196f3;
    color: white;
}

.dvc-notification-content {
    flex: 1;
    line-height: 1.4;
}

.dvc-notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.dvc-notification-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .dvc-upload-zone {
        padding: 30px 15px;
    }

    .dvc-upload-info {
        flex-direction: column;
        gap: 10px;
    }

    .dvc-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dvc-file-preview {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .dvc-file-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .dvc-notification {
        left: 10px;
        right: 10px;
        max-width: none;
        top: 10px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dvc-upload-zone {
        border-width: 3px;
    }

    .dvc-file-item {
        border-width: 2px;
    }

    .dvc-file-actions button {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dvc-upload-zone,
    .dvc-file-item,
    .dvc-notification,
    .dvc-progress-fill {
        animation: none;
        transition: none;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .dvc-upload-zone {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .dvc-upload-zone:hover {
        background: #333;
        border-color: #e67e14;
    }

    .dvc-file-item {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .dvc-file-item:hover {
        background: #333;
    }

    .dvc-file-name {
        color: #e0e0e0;
    }

    .dvc-file-size {
        color: #aaa;
    }

    .dvc-file-actions button {
        background: #333;
        border-color: #555;
        color: #e0e0e0;
    }

    .dvc-file-actions button:hover {
        background: #444;
    }

    .dvc-file-preview {
        background: #333;
    }

    .dvc-file-progress {
        background: #444;
    }

    .dvc-progress-bar {
        background: #555;
    }
}
