/* 
* File Upload & Form Component Styles
* This file contains styles for the file upload interface and related components
*/

/* File Upload Button */
.file-upload-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #4a92ff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-weight: 500;
    margin: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-upload-button:hover {
    background-color: #3a82ff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.file-upload-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.file-button-text {
    margin-left: 8px;
}

/* Dropzone & Preview Area */
.dropzone-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    min-height: 60px;
    border: 2px dashed #e9ecef;
    border-radius: 6px;
    padding: 10px;
    background-color: #f8f9fa;
}

.dz-preview {
    position: relative;
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: #fff;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.dz-preview:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dz-image {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Video Preview */
.video-preview-item {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #000;
}

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

/* Audio Preview */
.audio-preview-item {
    width: 220px;
    border-radius: 4px;
    padding: 10px;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Remove Button */
.dz-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4d4d;
    color: white !important;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    opacity: 0.8;
    transition: all 0.2s ease;
}

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

/* Price Button */
.post-price-button {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: #ffad33;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 9;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.post-price-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Save Button Styles */
.submit-button, .save-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.submit-button:hover, .save-button:hover {
    background-color: #43a047;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.submit-button:active, .save-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.submit-button:disabled, .save-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Loading indicator */
.upload-loading {
    position: relative;
}

.upload-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: upload-spin 1s linear infinite;
}

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

/* Fix for file input visibility */
input[type="file"].form-control {
    padding: 6px;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropzone-previews {
        justify-content: center;
    }
    
    .dz-preview, .video-preview-item {
        width: 100px;
        height: 100px;
    }
    
    .audio-preview-item {
        width: 180px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dropzone-previews {
        background-color: #2d2d2d;
        border-color: #444;
    }
    
    .dz-preview {
        background-color: #333;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
    
    .dz-image {
        background-color: #222;
    }
    
    .audio-preview-item {
        background-color: #2a2a2a;
    }
} 