/* Styly pro přílohy v komentářích */

.attachment-upload {
    margin-top: 1rem;
}

.attachment-upload label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.file-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #f7fafc;
}

.file-upload-area:hover {
    border-color: #4299e1;
    background-color: #ebf8ff;
}

.file-upload-area.dragover {
    border-color: #3182ce;
    background-color: #bee3f8;
}

.file-upload-input {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.upload-text {
    color: #718096;
    margin: 0.5rem 0;
}

.upload-hint {
    font-size: 0.875rem;
    color: #a0aec0;
}

.uploaded-files {
    margin-top: 1rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-icon {
    margin-right: 0.5rem;
    color: #4299e1;
}

.file-name {
    font-weight: 500;
    color: #2d3748;
    margin-right: 0.5rem;
}

.file-size {
    font-size: 0.875rem;
    color: #718096;
}

.remove-file {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.remove-file:hover {
    background-color: #fed7d7;
}

/* Zobrazení příloh v komentářích */
.comment-attachments {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s;
    cursor: pointer;
}

.attachment-preview:hover {
    transform: scale(1.02);
}

.attachment-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
}

.attachment-video {
    width: 120px;
    height: 120px;
    background-color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.attachment-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    text-align: center;
}

/* Lightbox pro zobrazení obrázků */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Upload progress */
.upload-progress {
    margin-top: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    height: 4px;
}

.progress-bar {
    height: 100%;
    background-color: #4299e1;
    transition: width 0.3s ease;
}

/* Error states */
.upload-error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.file-upload-area.error {
    border-color: #e53e3e;
    background-color: #fed7d7;
}

/* Responsive design */
@media (max-width: 768px) {
    .attachment-image,
    .attachment-video {
        width: 80px;
        height: 80px;
    }
    
    .file-upload-area {
        padding: 1rem;
    }
    
    .uploaded-file {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .remove-file {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}