/* ==================== Video Upload UI (Web Version - Clean & Intuitive) ==================== */

.upload-section {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Upload Drop Zone */
/* Upload Drop Zone */
.upload-drop-zone {
    background: #fff;
    border-radius: 20px;
    padding: 20px 30px;
    text-align: center;
    border: 2px dashed #d0d0d0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: #007aff;
    background: #fbfbfd;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.15);
}

.upload-icon-circle {
    margin: 0 auto 32px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.upload-drop-zone:hover .upload-icon-circle {
    transform: translateY(-5px);
}

.upload-icon-circle svg circle {
    fill: #f5f5f7 !important;
    transition: fill 0.3s ease;
}

.upload-drop-zone:hover .upload-icon-circle svg circle {
    fill: #e0eaff !important;
}

.upload-icon-circle svg path,
.upload-icon-circle svg rect {
    stroke: #86868b !important;
    fill: #86868b !important;
    transition: all 0.3s ease;
}

.upload-drop-zone:hover .upload-icon-circle svg path,
.upload-drop-zone:hover .upload-icon-circle svg rect {
    stroke: #007aff !important;
    fill: #007aff !important;
}

.upload-main-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 28px 0;
    line-height: 1.4;
}

/* Upload Info Cards */
.upload-info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 28px 0;
    pointer-events: none;
    /* Allow clicks to pass through to drop zone */
}

/* Make AIV and Warning cards span full width */
.upload-info-card:nth-child(3),
.upload-info-card:nth-child(4) {
    grid-column: 1 / -1;
}

.upload-info-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: left;
    pointer-events: none;
    /* Allow clicks to pass through to drop zone */
}

.upload-info-card.warning {
    background: #fff9e6;
    border-color: #ffd700;
}

.upload-info-card.warning .info-icon {
    color: #ff9500;
}

.upload-info-card.aiv-card {
    background: linear-gradient(135deg, #f0f5ff 0%, #fff 100%);
    border-color: #c5d9ff;
}

.upload-info-card.aiv-card .info-icon {
    color: #007aff;
}

.info-icon {
    flex-shrink: 0;
    color: #666;
    width: 24px;
    height: 24px;
}

.upload-info-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 4px 0;
}

.upload-info-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Upload Action Buttons Removed */

/* Video Selected Container */
.video-selected-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.video-thumbnail-container {
    position: relative;
    width: 80%;
    aspect-ratio: 16 / 9;
    margin: 32px auto 0;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-weight: 500;
    gap: 8px;
}

.video-thumbnail-container:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay svg {
    stroke: white;
}

/* Camera Badge - Always Visible Indicator */
.thumbnail-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    z-index: 2;
    animation: badgePulse 2s ease-in-out 1;
}

.thumbnail-badge svg {
    stroke: #1d1d1f;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.video-thumbnail-container:hover .thumbnail-badge {
    transform: scale(1.1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.video-thumbnail-container:hover .thumbnail-badge svg {
    opacity: 1;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 2px 8px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(0, 0, 0, 0.05);
    }

    50% {
        transform: scale(1.15);
        box-shadow:
            0 4px 16px rgba(0, 122, 255, 0.3),
            0 0 0 2px rgba(0, 122, 255, 0.2);
    }
}

.thumbnail-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Video Info Row */
.video-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 24px;
    margin: 12px auto 24px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 30px;
    width: fit-content;
}

.check-icon {
    flex-shrink: 0;
}

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

.file-name-text {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size-text {
    font-size: 11px;
    color: #86868b;
    margin: 0;
}

.btn-remove-video {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.btn-remove-video:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* Metadata Section */
.metadata-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}

/* Video Type Buttons */
.video-type-buttons {
    display: flex;
    gap: 12px;
}

.btn-video-type {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-video-type:hover {
    background: #ebebeb;
    border-color: #ccc;
}

.btn-video-type.active {
    background: #000;
    border-color: #000;
    color: #fff;
}

.btn-video-type svg {
    stroke: currentColor;
    width: 18px;
    height: 18px;
}

/* Field of View Section */
.fov-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fov-label {
    font-size: 15px;
    color: #666;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.fov-buttons {
    display: flex;
    gap: 12px;
}

.btn-fov {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-fov:hover {
    background: #ebebeb;
    border-color: #ccc;
}

.btn-fov.active {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* Form Fields */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 15px;
    color: #1d1d1f;
    font-weight: 600;
}

.form-field input[type="text"],
.form-field textarea {
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    color: #1d1d1f;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-field input[type="text"]:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-field input[type="text"]::placeholder,
.form-field textarea::placeholder {
    color: #999;
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.char-counter {
    text-align: right;
    font-size: 13px;
    color: #86868b;
    margin: -4px 0 0 0;
}

/* Submit Upload Button */
.btn-submit-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 32px;
    background: #000;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-submit-upload:hover:not(:disabled) {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-submit-upload:disabled {
    background: #d0d0d0;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-submit-upload svg {
    stroke: currentColor;
}

/* Upload Progress */
.upload-progress-container {
    margin: 24px 0;
}

.progress-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.progress-header p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

.progress-bar-container {
    height: 10px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 18px;
}

.progress-bar-fill {
    height: 100%;
    background-color: #1d1d1f;
    /* Animated Stripes Pattern */
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.08) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.08) 75%,
            transparent 75%,
            transparent);
    background-size: 30px 30px;
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: moveStripes 1s linear infinite;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Shimmer effect overlay */
.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes moveStripes {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 30px 0;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.btn-cancel-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-upload:hover {
    background: #ebebeb;
    border-color: #bbb;
}

.upload-notice {
    text-align: center;
    font-size: 13px;
    color: #86868b;
    margin: 14px 0 0 0;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-section {
        padding: 24px 16px;
    }

    .upload-drop-zone {
        padding: 20px 16px;
    }

    .upload-icon-circle {
        margin-bottom: 16px;
        transform: scale(0.8);
    }

    .upload-main-title {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .upload-info-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

    .upload-info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 12px;
        gap: 8px;
    }

    /* AIV card (3rd item) spans full width */
    .upload-info-card:nth-child(3) {
        grid-column: 1 / -1;
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    /* Warning card (4th item) spans full width */
    .upload-info-card:nth-child(4) {
        grid-column: 1 / -1;
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }

    .upload-info-card h4 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .upload-info-card p {
        font-size: 11px;
        line-height: 1.3;
        color: #86868b;
    }

    .btn-upload-action {
        padding: 14px 20px;
        font-size: 15px;
    }

    .video-selected-container {
        gap: 16px;
    }

    .video-thumbnail-container {
        width: 95%;
        margin-bottom: 8px;
    }

    .video-info-row {
        padding: 6px 12px;
        margin-bottom: 20px;
    }

    .video-type-buttons,
    .fov-buttons {
        flex-direction: row;
        gap: 8px;
    }

    .btn-video-type,
    .btn-fov {
        flex: 1;
        padding: 8px 4px;
        font-size: 13px;
        flex-direction: column;
        gap: 4px;
    }

    .btn-video-type svg,
    .btn-fov svg {
        width: 16px;
        height: 16px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .metadata-form-group {
        margin-bottom: 16px;
    }
}