/**
 * Secure Upload CSS
 * Styles for the secure file upload interface
 * Refactored to be consistent with design system
 */

/* Container */
.upload-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Step Container */
.step-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.step-header {
    color: var(--primary-color);
    padding: 20px;
    text-align: center;
}

.step-content {
    padding: 30px;
}

/* Email Verification Step */
.email-form {
    text-align: center;
}

.email-form h2 {
    margin-bottom: 10px;
    color: #333;
}

.email-form p {
    color: #666;
    margin-bottom: 30px;
}

/* Event Selection Step */
.event-selection {
    display: none;
}

.event-card {
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.event-card.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.event-date {
    color: #666;
    font-size: 14px;
}

.event-ambassador {
    background: #ffc107;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

/* Upload Area */
.upload-area {
    display: none;
}

.drag-drop-zone {
    border: 3px dashed var(--primary-color);
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.drag-drop-zone.dragover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    transform: scale(1.02);
}

.drag-drop-zone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.drag-drop-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.drag-drop-subtext {
    color: #666;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

/* Upload Limits */
.upload-limits {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.upload-limits h4 {
    margin-bottom: 15px;
    color: #333;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5e9;
}

.limit-item:last-child {
    border-bottom: none;
}

.limit-label {
    font-weight: 600;
    color: #333;
}

.limit-value {
    color: var(--primary-color);
    font-weight: 600;
}

/* File Preview */
.file-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.file-preview {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.file-preview:hover {
    transform: translateY(-5px);
}

.file-preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f8f9fa;
}

.file-preview-info {
    padding: 15px;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
}

.file-progress {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e1e5e9;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.file-action-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Overall Progress */
.overall-progress {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.overall-progress h4 {
    margin-bottom: 15px;
    color: #333;
}

.overall-progress-bar {
    width: 100%;
    height: 10px;
    background: #e1e5e9;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.overall-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

.overall-progress-text {
    text-align: center;
    color: #666;
    font-weight: 600;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    position: relative;
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    line-height: 1.4;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Photo Review */
.photo-review {
    display: none;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.photo-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.photo-info {
    padding: 15px;
}

.photo-description {
    margin-bottom: 15px;
}

.photo-description textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
}

.photo-actions {
    display: flex;
    gap: 8px;
}

.photo-action-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .upload-container {
        padding: 10px;
    }

    .step-content {
        padding: 20px;
    }

    .drag-drop-zone {
        padding: 40px 15px;
    }

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

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.event-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
