/* VibeCoding Uploader System - Consolidated */

/* Main uploader container */
.uploader-tabs-container {
    background-color: #202020;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #2c2c2c;
    margin-bottom: 20px;
    min-width: 400px;
    max-width: 600px;
    width: 600px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tab navigation */
.uploader-tab-navigation {
    display: flex;
    background-color: #202020;
    border-bottom: none;
    flex: 0 0 auto;
}

/* Tab button styling - optimized for space efficiency */
.uploader-tab-button {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #cccccc;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    min-width: 0;
}

.uploader-tab-button:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.uploader-tab-button.active {
    color: #ffffff;
    background-color: #1a1a1a;
}
.uploader-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #3498db;
}

/* Tab content */
.uploader-tab-content {
    padding: 0;
    flex: 1 1 auto;
    overflow: hidden;
    min-height: 0;
}

.uploader-tab-pane {
    display: none;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.uploader-tab-pane.active {
    display: block;
}

/* Upload containers */
.image-upload-container,
.background-upload-container {
    background: transparent;
}

/* Upload area styling - consolidated best approach */
.upload-area {
    border: 2px dashed #444;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    margin-bottom: 10px;
    transition: all 0.2s;
    background-color: #222;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

/* Upload content optimization */
.upload-content p {
    margin: 2px 0;
    line-height: 1.2;
}

.upload-content p:first-child {
    margin-top: 0;
}

.upload-content p:last-child {
    margin-bottom: 0;
}

/* Upload button styling */
.button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    margin: 2px 0;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.button:active {
    transform: translateY(0);
}

/* Preview containers */
.preview-container,
.background-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    pointer-events: auto;
}

/* Image preview styling - enhanced */
.image-preview,
.background-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background-color: #1a1a1a;
    transition: all 0.2s;
    pointer-events: auto;
}

.image-preview:hover,
.background-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.image-preview img,
.background-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Video preview styling */
.video-preview {
    cursor: pointer;
}

.background-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Play icon overlay for videos */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

/* Media info styling */
.media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 8px 4px 4px;
    pointer-events: none;
}

.media-info .filename {
    font-size: 10px;
    color: white;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.media-info .media-details {
    font-size: 8px;
    color: #ccc;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Video preview modal */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.video-preview-modal video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.video-preview-modal button {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.video-preview-modal button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Upload error styling */
.upload-error {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Remove buttons with enhanced visibility */
.remove-preview,
.remove-background {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}

.image-preview:hover .remove-preview,
.background-preview:hover .remove-background {
    opacity: 1;
}

.remove-preview:hover,
.remove-background:hover {
    background-color: #e74c3c;
    transform: scale(1.1);
}

/* Color swatch - enhanced visibility */
.color-swatch {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 4px !important;
    border: 3px solid white !important;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.8) !important;
    z-index: 100 !important;
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Color indicator container */
.color-indicator-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Color and background labels */
.color-label {
    font-size: 10px;
    color: white;
    padding: 4px;
    padding-left: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.background-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    background-color: rgba(0, 0, 0, 0.7);
    font-size: 10px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Background settings */
.background-settings {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.setting {
    margin-bottom: 15px;
}

.setting label {
    display: block;
    margin-bottom: 6px;
    color: #e0e0e0;
    font-weight: 500;
}

.setting-description {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

/* Range inputs */
input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #333;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

/* File types text */
.file-types {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    line-height: 1.1;
}

.file-description {
    font-size: 10px;
    color: #888;
    margin-top: 1px;
    font-style: italic;
    line-height: 1.1;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .uploader-tabs-container {
        margin-left: 0;
        width: 100%;
        max-width: 500px;
        min-width: 350px;
    }
    
    .uploader-tab-button {
        font-size: 15px;
        padding: 14px 12px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Medium screen adjustments - where text starts getting cramped */
@media (max-width: 600px) {
    .uploader-tab-pane {
        padding: 8px;
    }
    
    .upload-area {
        padding: 14px 10px;
        margin-bottom: 8px;
    }
    
    .upload-content p {
        font-size: 14px;
        margin: 1px 0;
    }
    
    .button {
        padding: 8px 14px;
        font-size: 14px;
        min-height: 38px;
    }
    
    .file-types {
        font-size: 11px;
        margin-top: 1px;
    }
    
    .file-description {
        font-size: 10px;
        margin-top: 1px;
    }
    
    .preview-container,
    .background-preview-container {
        gap: 8px;
        margin-top: 6px;
    }
    
    .uploader-tab-button {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 12px 6px;
    }
    
    .video-preview-modal video {
        max-width: 95%;
        max-height: 80%;
    }
    
    .video-preview-modal button {
        top: 10px;
        right: 15px;
        font-size: 20px;
        padding: 8px;
        width: 40px;
        height: 40px;
    }
}

/* Tablet responsive adjustments */
@media (max-width: 768px) {
    .uploader-tabs-container {
        width: 100%;
        max-width: 400px;
        min-width: 300px;
    }
    
    .uploader-tab-pane {
        padding: 8px;
    }
    
    .upload-area {
        padding: 14px 10px;
        margin-bottom: 8px;
    }
    
    .upload-content p {
        font-size: 14px;
    }
    
    .button {
        padding: 8px 14px;
        font-size: 14px;
        min-height: 38px;
    }
    
    .file-types {
        font-size: 11px;
    }
    
    .file-description {
        font-size: 10px;
    }
    
    .uploader-tab-button {
        font-size: 14px;
        padding: 12px 8px;
        font-weight: 600;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .uploader-tabs-container {
        width: 100%;
        max-width: 350px;
        min-width: 280px;
    }
    
    .uploader-tab-pane {
        padding: 8px;
    }
    
    .upload-area {
        padding: 12px 8px;
        margin-bottom: 8px;
    }
    
    .upload-content p {
        font-size: 14px;
        margin: 1px 0;
    }
    
    .button {
        padding: 8px 12px;
        font-size: 14px;
        min-height: 40px;
        margin: 2px 0;
    }
    
    .file-types {
        font-size: 10px;
        margin-top: 1px;
    }
    
    .file-description {
        font-size: 9px;
        margin-top: 0px;
    }
    
    .preview-container,
    .background-preview-container {
        gap: 8px;
        margin-top: 6px;
    }
    
    .uploader-tab-button {
        font-size: 13px;
        padding: 10px 6px;
        font-weight: 600;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .image-preview,
    .background-preview {
        width: 80px;
        height: 80px;
    }
    
    .media-info .filename {
        font-size: 9px;
    }
    
    .media-info .media-details {
        font-size: 7px;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 360px) {
    .uploader-tabs-container {
        width: 100%;
        max-width: 320px;
        min-width: 280px;
    }
    
    .uploader-tab-pane {
        padding: 6px;
    }
    
    .upload-area {
        padding: 10px 6px;
        margin-bottom: 6px;
    }
    
    .upload-content p {
        font-size: 13px;
    }
    
    .button {
        padding: 6px 10px;
        font-size: 13px;
        min-height: 38px;
    }
    
    .file-types {
        font-size: 9px;
    }
    
    .file-description {
        font-size: 8px;
    }
    
    .preview-container,
    .background-preview-container {
        gap: 6px;
        margin-top: 4px;
    }
    
    .uploader-tab-button {
        font-size: 12px;
        padding: 8px 10px;
        font-weight: 600;
        line-height: 1.2;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .image-preview,
    .background-preview {
        width: 70px;
        height: 70px;
    }
}

/* Ultra small mobile - maximum space efficiency */
@media (max-width: 320px) {
    .uploader-tab-pane {
        padding: 4px;
    }
    
    .upload-area {
        padding: 8px 4px;
        margin-bottom: 4px;
        border-radius: 8px;
    }
    
    .upload-content p {
        font-size: 12px;
        margin: 0;
    }
    
    .button {
        padding: 6px 8px;
        font-size: 12px;
        min-height: 36px;
        border-radius: 6px;
        margin: 1px 0;
    }
    
    .file-types {
        font-size: 8px;
        margin-top: 0;
    }
    
    .file-description {
        font-size: 7px;
        margin-top: 0;
    }
    
    .preview-container,
    .background-preview-container {
        gap: 4px;
        margin-top: 2px;
    }
    
    .image-preview,
    .background-preview {
        width: 60px;
        height: 60px;
    }
    
    .media-info .filename {
        font-size: 7px;
    }
    
    .media-info .media-details {
        font-size: 6px;
    }
}
