/**
 * Pokemon Oblivion - Estilos Globais para Anexos
 * CSS unificado para exibição de anexos em tickets
 */

/* ============================================
   ATTACHMENT PREVIEW SECTION
   ============================================ */
.attachment-preview-section {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(0, 255, 136, 0.05) 100%);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 14px;
    border-left: 4px solid var(--color-primary, #00d4ff);
}

.attachment-preview-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary, #ffffff);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.attachment-preview-section h4 i {
    color: var(--color-primary, #00d4ff);
}

.attachment-info {
    margin-bottom: 20px;
}

.attachment-url-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-secondary, #a0aec0);
    font-size: 0.9rem;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.attachment-url-info i {
    color: var(--color-primary, #00d4ff);
}

.attachment-url-info strong {
    color: var(--text-primary, #ffffff);
}

.attachment-link {
    color: var(--color-primary, #00d4ff);
    text-decoration: none;
    word-break: break-all;
    transition: all 0.3s ease;
    border-bottom: 1px dotted rgba(0, 212, 255, 0.5);
}

.attachment-link:hover {
    color: var(--color-secondary, #00ff88);
    border-bottom-color: var(--color-secondary, #00ff88);
    text-decoration: none;
}

/* ============================================
   IMAGE PREVIEW
   ============================================ */
.image-preview-container {
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 212, 255, 0.3);
}

.image-preview-link {
    display: block;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-preview-link:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.attachment-image-preview {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.image-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.image-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.image-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

/* ============================================
   FILE PREVIEW
   ============================================ */
.file-preview-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.file-preview-container:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateX(5px);
}

.file-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 255, 136, 0.15) 100%);
    border-radius: 12px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    font-size: 2rem;
    color: var(--color-primary, #00d4ff);
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
    margin-bottom: 5px;
    word-break: break-word;
}

.file-type {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0aec0);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.file-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ============================================
   MESSAGE ATTACHMENTS
   ============================================ */
.message-attachment {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    border-left: 3px solid var(--color-primary, #00d4ff);
}

.message-attachment .attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.message-attachment .attachment-link:hover {
    background: rgba(0, 212, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.message-attachment .attachment-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.message-attachment .attachment-preview img {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-attachment .attachment-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload-wrapper {
    position: relative;
    margin-top: 10px;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-info {
    padding: 30px;
    background: var(--bg-secondary, #141829);
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover .file-upload-info {
    border-color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--color-primary, #00d4ff);
    margin-bottom: 15px;
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-main-text {
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
}

.upload-sub-text,
.upload-size-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0aec0);
}

.file-preview {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: none;
}

.file-preview.active {
    display: block;
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
}

.file-error {
    margin-top: 10px;
    padding: 12px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 8px;
    color: #ff4757;
    font-size: 0.9rem;
    display: none;
}

.file-error.active {
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .attachment-preview-section {
        padding: 15px;
    }
    
    .image-wrapper {
        max-width: 100%;
    }
    
    .attachment-image-preview {
        max-height: 300px;
    }
    
    .file-preview-container {
        flex-direction: column;
        text-align: center;
    }
    
    .file-actions {
        width: 100%;
        justify-content: center;
    }
    
    .image-actions {
        flex-direction: column;
    }
    
    .image-actions .btn {
        width: 100%;
        justify-content: center;
    }
}





