/**
 * UploadForm Component Styles
 * Modern design inspired by shadcn/ui
 */

/* Override body overflow for upload page */
body {
    overflow-y: auto !important;
    height: auto !important;
}

/* Make menu bar scroll with content on upload page */
.menu-bar {
    position: absolute !important;
}

/* Container */
.upload-form-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 2rem 2rem 2rem;
    background: #000000;
    overflow-y: auto;
}

/* Card */
.upload-card {
    width: 100%;
    max-width: 800px;
    background: transparent;
    border-radius: 12px;
    padding: 3rem;
}

/* Title & Description */
.upload-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    font-family: var(--font-retro);
}

.upload-description {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

/* Upload Zone */
.upload-zone {
    border: 2px solid #4b5563;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
}

.upload-zone:hover {
    border-color: #6b7280;
    background: rgba(255, 255, 255, 0.1);
}

.upload-zone.drag-over {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

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

.upload-zone-text {
    font-size: 1rem;
    color: #e5e7eb;
    margin: 0;
    font-family: var(--font-mono);
}

.upload-zone-primary {
    font-weight: 600;
    color: #60a5fa;
}

.upload-zone-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-family: var(--font-mono);
}

/* File Preview Container */
.file-preview-container {
    margin-bottom: 2rem;
}

.file-preview-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
}

.file-preview-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    font-family: var(--font-mono);
}

.clear-button {
    font-size: 0.875rem;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
    font-weight: 500;
}

/* File Preview Grid */
.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #374151;
    background: rgba(255, 255, 255, 0.05);
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    gap: 0.5rem;
}

.preview-name {
    font-size: 0.75rem;
    color: #9ca3af;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin: 0;
    font-family: var(--font-mono);
    flex: 1;
    min-width: 0;
}

.remove-button {
    background: transparent;
    color: #ef4444;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.remove-button:hover {
    color: #dc2626;
}

/* Metadata Form */
.metadata-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.required {
    color: #ef4444;
}

.form-select,
.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #4b5563;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-select {
    cursor: pointer;
}

/* Upload Button */
.upload-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
    position: relative;
    overflow: hidden;
}

.upload-button .button-text {
    position: relative;
    z-index: 2;
}

.upload-button .button-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.25);
    transition: width 0.3s ease;
    z-index: 1;
}

.upload-button.uploading {
    background: #2563eb;
    cursor: default;
}

.upload-button.uploading:disabled {
    background: #2563eb;
    cursor: default;
}

.upload-button:hover:not(:disabled):not(.uploading) {
    background: #2563eb;
}

.upload-button:disabled:not(.uploading) {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Upload Errors Container */
.upload-errors-container {
    width: 100%;
    margin-top: 1rem;
}

.upload-error-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}

.upload-error-item:not(:last-child) {
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.upload-error-text {
    color: #ef4444;
    font-size: 0.875rem;
    font-family: var(--font-mono);
    flex: 1;
    word-break: break-word;
}

.upload-error-dismiss {
    background: transparent;
    border: none;
    color: #ef4444;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.upload-error-dismiss:hover {
    color: #dc2626;
}

/* Progress Container */
.progress-container {
    margin-top: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
    font-family: var(--font-mono);
}

/* Error Container */
.error-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
}

.error-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.error-container p {
    font-size: 1rem;
    color: #9ca3af;
    font-family: var(--font-mono);
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-card {
        padding: 2rem 1.5rem;
    }

    .upload-title {
        font-size: 1.5rem;
    }

    .file-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .preview-image {
        height: 120px;
    }
}

@media screen and (max-width: 480px) {
    .upload-form-container {
        padding: 5rem 1rem 1rem 1rem;
    }

    .upload-card {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    .upload-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .file-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .preview-image {
        height: 100px;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-select,
    .form-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .upload-button {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Landscape View */
@media screen and (max-height: 450px) and (orientation: landscape) {
    .upload-form-container {
        padding: 4rem 1rem 1rem 1rem;
    }

    .upload-card {
        padding: 1rem;
    }

    .upload-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .upload-zone {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}

/* Video Preview Styles */
.video-preview-item {
    margin-top: 1rem;
}

.preview-video {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    background: #111;
}

.video-preview-item .preview-name {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    font-family: system-ui, -apple-system, sans-serif;
}

.file-preview-count {
    font-size: 0.875rem;
    color: #9ca3af;
    font-family: system-ui, -apple-system, sans-serif;
    margin-right: auto;
}
