/* Upload Manager - Uploader Styles */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.5;
    padding: 20px;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 24px;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a2e;
}

/* Upload-Typ Auswahl */
.upload-type-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.upload-type-selector label {
    font-weight: 500;
    color: #555;
}

.upload-type-selector select,
.custom-type-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    color: #333;
}

.upload-type-selector select:focus,
.custom-type-input:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.custom-type-input {
    flex: 1;
    min-width: 150px;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #ccd5e0;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: #4a90d9;
    background: #f0f7ff;
}

.dropzone.dragover {
    transform: scale(1.01);
}

.dropzone-icon {
    width: 48px;
    height: 48px;
    color: #8899a6;
    margin-bottom: 12px;
}

.dropzone-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 4px;
}

.dropzone-hint {
    font-size: 0.9rem;
    color: #888;
}

/* Dateiliste */
.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.file-item:hover {
    background: #f0f2f5;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.85rem;
    color: #888;
}

.file-remark {
    margin-top: 8px;
}

.file-remark input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-remark input:focus {
    outline: none;
    border-color: #4a90d9;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    transition: color 0.2s;
}

.file-remove:hover {
    color: #e74c3c;
}

.file-remove svg {
    width: 20px;
    height: 20px;
}

/* Buttons */
.upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-primary:hover {
    background: #3a7bc8;
}

.btn-primary:disabled {
    background: #a0c4eb;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e9ecef;
    color: #555;
}

.btn-secondary:hover {
    background: #dde2e6;
}

/* Progress */
.upload-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90d9, #67a8e8);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Ergebnis */
.upload-result {
    text-align: center;
    padding: 30px;
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.result-icon.success {
    background: #d4edda;
    color: #28a745;
}

.result-icon.error {
    background: #f8d7da;
    color: #dc3545;
}

.result-icon svg {
    width: 32px;
    height: 32px;
}

.result-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

.result-text p {
    margin-bottom: 16px;
}

/* Datei-Links nach Upload */
.file-links {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.file-links-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.file-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-links-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.file-links-list li:last-child {
    margin-bottom: 0;
}

.file-link-name {
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.file-link-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.file-link-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #e9ecef;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
    text-decoration: none;
}

.file-link-btn:hover {
    background: #4a90d9;
    color: #fff;
}

.file-link-btn.copied {
    background: #28a745;
    color: #fff;
}

.file-link-btn svg {
    width: 16px;
    height: 16px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .upload-container {
        padding: 16px;
    }

    .dropzone {
        padding: 30px 15px;
    }

    .upload-type-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .upload-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
