/* public/css/universal_file_upload.css */

.universal-upload-wrapper {
    position: relative;
    max-width: 585px;
}

.universal-upload-input {
    display: none !important;
}

.universal-upload-group {
    margin-bottom: 1.5rem;
}

.universal-upload-group .form-help {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.upload-container {
    background: white;
  /*  border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem; */
}
.universal-upload-group .upload-container  {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

/* Upload type specific styling */
/*
.upload-type-images {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf2, #ffffff);
}

.upload-type-documents {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #f0f7ff, #ffffff);
}

.upload-type-certificates {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.upload-type-financial {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff, #ffffff);
}
 */

.drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafbfc;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/*
.upload-type-images .drop-zone:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.upload-type-documents .drop-zone:hover {
    border-color: #3b82f6;
    background: #f8faff;
}

.upload-type-certificates .drop-zone:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.upload-type-financial .drop-zone:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}
 */

.drop-zone:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    /*
    border-color: #3b82f6;
    background: #f8faff;
    */
}

.drop-zone.dragover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.drop-zone.error {
    border-color: #ef4444;
    background: #fef2f2;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.6;
    color: #6b7280;
    transition: all 0.3s ease;
}

.upload-type-images .upload-icon {
    color: #f59e0b;
}

.upload-type-documents .upload-icon {
    color: #3b82f6;
}

.upload-type-certificates .upload-icon {
    color: #10b981;
}

.upload-type-financial .upload-icon {
    color: #8b5cf6;
}

.upload-text {
    color: #374151;
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.upload-limit {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.browse-button {
    color: #3F4DA7;
    text-decoration: underline;
    font: normal normal normal 16px/23px Lexend;
    cursor: pointer;
}
/*
.browse-button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.upload-type-images .browse-button {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.upload-type-certificates .browse-button {
    background: linear-gradient(135deg, #10b981, #059669);
}

.upload-type-financial .browse-button {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.browse-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}*/

.file-list {
    margin-top: 1.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

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

.file-preview {
    width: 40px;
    height: 40px;
    margin-right: 0.75rem;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #f3f4f6;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    color: #6b7280;
    opacity: 0.8;
    flex-shrink: 0;
}

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

.file-name {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    word-break: break-word;
}

.file-size {
    color: #9ca3af;
    font-size: 0.75rem;
}

.file-remove {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    line-height: 28px;
    flex-shrink: 0;
}

.file-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.progress-bar {
    width: 100%;
    height: 3px;
    background: #f3f4f6;
    border-radius: 1.5px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 1.5px;
    transition: width 0.3s ease;
}

.error-message {
    background: #fef2f2;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    border-left: 4px solid #ef4444;
    font-size: 0.875rem;
    animation: fadeIn 0.3s ease;
}

.success-message {
    background: #f0fdf4;
    color: #059669;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    border-left: 4px solid #10b981;
    font-size: 0.875rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-types {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.file-type {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 500;
}

.file-type-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.file-size-limit {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: #fef2f2;
    border-radius: 0.25rem;
    border: 1px solid #fecaca;
}

.files-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #3b82f6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    line-height: 1;
}

.existing-files-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.existing-file-item {
    background-color: #f8f9fa;
    border-left: 3px solid #28a745;
}

.existing-file-item.marked-for-removal {
    opacity: 0.5;
    background-color: #f8d7da;
    border-left-color: #dc3545;
}

.file-item.existing-file {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.file-status {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
}

@keyframes uploadSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.upload-success {
    animation: uploadSuccess 0.6s ease;
}

/* Responsive design */
@media (max-width: 640px) {
    .upload-container {
        padding: 1rem;
    }

    .drop-zone {
        padding: 1.5rem 1rem;
    }

    .file-types {
        gap: 1rem;
        font-size: 0.6875rem;
    }

    .upload-text {
        font-size: 1rem;
    }

    .file-item {
        padding: 0.5rem 0.75rem;
    }

    .file-icon {
        width: 24px;
        height: 24px;
        margin-right: 0.5rem;
    }
}

/* Dark mode support */
/*
@media (prefers-color-scheme: dark) {
    .upload-container {
        background: #1f2937;
        border-color: #374151;
    }

    .drop-zone {
        background: #111827;
        border-color: #4b5563;
    }

    .upload-text {
        color: #f3f4f6;
    }

    .upload-hint {
        color: #9ca3af;
    }

    .file-item {
        background: #1f2937;
        border-color: #374151;
    }

    .file-name {
        color: #f3f4f6;
    }
}*/

/* single file */
.existing-file-container { margin-bottom: 1rem; }
.existing-file-info small { margin-top: 0.25rem; }
.existing-file-actions .btn { margin-left: 16px; }
.upload-replacement { margin-top: 0; }

.custom-file-input::file-selector-button {
    background-color: #3F4DA7;  /* barva tlačítka */
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.custom-file-input::file-selector-button:hover {
    background-color: #2d47a6;  /* hover efekt */
    opacity: 1;
}

/* skryje defaultní placeholder "Vyberte soubor..." */
.custom-file-input::-webkit-file-upload-text {
    visibility: hidden;
}
.custom-file-input::file-selector-button + span {
    display: none;
}