﻿/* Bug Reports - Estilos */

/* FORZAR FONDO OSCURO SOLO EN PÁGINAS DE REPORTES */
body.dark-mode .tradeando-bug-report-form-container,
body.dark-mode .tradeando-mis-reportes-container {
    background-color: transparent !important;
}

/* Fondo oscuro solo para las páginas que contienen los contenedores de reportes */
body.dark-mode .tradeando-bug-report-form-container~*,
body.dark-mode .tradeando-mis-reportes-container~* {
    background-color: transparent !important;
}

/* Aplicar fondo oscuro al body solo si existe un contenedor de reportes */
body.dark-mode:has(.tradeando-bug-report-form-container),
body.dark-mode:has(.tradeando-mis-reportes-container) {
    background-color: #0f172a !important;
}

body.dark-mode:has(.tradeando-bug-report-form-container) #content,
body.dark-mode:has(.tradeando-bug-report-form-container) .site-content,
body.dark-mode:has(.tradeando-bug-report-form-container) .ast-container,
body.dark-mode:has(.tradeando-mis-reportes-container) #content,
body.dark-mode:has(.tradeando-mis-reportes-container) .site-content,
body.dark-mode:has(.tradeando-mis-reportes-container) .ast-container {
    background-color: #0f172a !important;
}

/* Formulario de Reporte */
.tradeando-bug-report-form-container {
    max-width: 800px;
    margin: -25px auto 0;
    padding: 30px;
}

.tradeando-bug-report-form-container h2,
.tradeando-bug-report-form-container p {
    color: #2c3e50;
}

body.dark-mode .tradeando-bug-report-form-container h2,
body.dark-mode .tradeando-bug-report-form-container p {
    color: #e5e7eb !important;
}

.tradeando-bug-form .form-group {
    margin-bottom: 20px;
}

.tradeando-bug-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

body.dark-mode .tradeando-bug-form label {
    color: #e5e7eb !important;
}

.tradeando-bug-form input[type="text"],
.tradeando-bug-form input[type="url"],
.tradeando-bug-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: white;
    color: #2c3e50;
}

body.dark-mode .tradeando-bug-form input[type="text"],
body.dark-mode .tradeando-bug-form input[type="url"],
body.dark-mode .tradeando-bug-form textarea {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

.tradeando-bug-form input:focus,
.tradeando-bug-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.tradeando-bug-form small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
}

body.dark-mode .tradeando-bug-form small {
    color: #9ca3af !important;
}

/* Upload Area */
.bug-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

body.dark-mode .bug-upload-area {
    border-color: #4b5563;
    background: #1f2937;
}

.bug-upload-area:hover,
.bug-upload-area.drag-over {
    border-color: #3498db;
    background: #ecf0f1;
}

body.dark-mode .bug-upload-area:hover,
body.dark-mode .bug-upload-area.drag-over {
    background: #374151;
}

.bug-upload-area svg {
    color: #95a5a6;
    margin-bottom: 10px;
}

.bug-upload-area p {
    margin: 10px 0 5px;
    color: #34495e;
    font-weight: 500;
}

body.dark-mode .bug-upload-area p {
    color: #e5e7eb !important;
}

.upload-preview {
    position: relative;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.upload-preview .remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

/* Botones */
.btn-submit-bug,
.btn-submit-reply {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-bug:hover,
.btn-submit-reply:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-submit-bug:disabled,
.btn-submit-reply:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mensajes */
.success-message {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    margin-top: 15px;
}

.error-message {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin-top: 15px;
}

/* Dashboard de Reportes */
.tradeando-mis-reportes-container {
    max-width: 1200px;
    margin: -25px auto 0;
    padding: 30px;
}

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

.reports-header h2 {
    margin: 0;
    color: #2c3e50;
}

body.dark-mode .reports-header h2 {
    color: #e5e7eb !important;
}

.btn-new-report,
.btn-primary {
    background: #3498db;
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-new-report:hover,
.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Sin reportes */
.no-reports {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

body.dark-mode .no-reports {
    background: #1f2937 !important;
}

.no-reports svg {
    color: #95a5a6;
    margin-bottom: 20px;
}

body.dark-mode .no-reports svg {
    color: #6b7280 !important;
}

.no-reports h3 {
    color: #34495e;
    margin-bottom: 10px;
}

body.dark-mode .no-reports h3 {
    color: #e5e7eb !important;
}

.no-reports p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

body.dark-mode .no-reports p {
    color: #9ca3af !important;
}

/* Tarjetas de Reporte */
.report-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

body.dark-mode .report-card {
    background: #1f2937 !important;
    color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.report-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.report-header {
    margin-bottom: 20px;
}

.report-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.report-title-section h3 {
    margin: 0;
    color: #2c3e50;
    flex: 1;
}

body.dark-mode .report-title-section h3 {
    color: #e5e7eb !important;
}

.report-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-nuevo {
    background: #fee;
    color: #e74c3c;
}

.status-revision {
    background: #fef5e7;
    color: #f39c12;
}

.status-resuelto {
    background: #d5f4e6;
    color: #27ae60;
}

.status-publish {
    background: #ebf5fb;
    color: #3498db;
}

.report-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.report-content {
    margin-bottom: 20px;
}

.report-description {
    color: #34495e;
    line-height: 1.6;
}

body.dark-mode .report-description {
    color: #e5e7eb !important;
}

.report-url {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

body.dark-mode .report-url {
    background: #374151 !important;
}

.report-url a {
    color: #3498db;
    word-break: break-all;
}

.report-screenshot {
    margin-top: 15px;
}

.screenshot-thumb {
    max-width: 300px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.screenshot-thumb:hover {
    transform: scale(1.05);
}

/* Conversación */
.report-conversation {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
}

.report-conversation h4 {
    margin-top: 0;
    color: #2c3e50;
}

body.dark-mode .report-conversation h4 {
    color: #e5e7eb !important;
}

.comments-thread {
    margin-top: 15px;
}

.comment-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-admin {
    background: #ebf5fb;
    border-left: 4px solid #3498db;
}

body.dark-mode .comment-admin {
    background: #1e3a5f !important;
}

.comment-user {
    background: #f8f9fa;
    border-left: 4px solid #95a5a6;
}

body.dark-mode .comment-user {
    background: #374151 !important;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.admin-badge {
    font-weight: 600;
    color: #3498db;
}

.comment-date {
    color: #7f8c8d;
    font-size: 12px;
}

.comment-content {
    color: #34495e;
    line-height: 1.6;
}

body.dark-mode .comment-content {
    color: #e5e7eb !important;
}

/* Formulario de Respuesta */
.report-reply-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.report-reply-form h4 {
    margin-top: 0;
    color: #2c3e50;
}

body.dark-mode .report-reply-form h4 {
    color: #e5e7eb !important;
}

.report-reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    resize: vertical;
}

body.dark-mode .report-reply-form textarea {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

.report-reply-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
    .reports-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .report-title-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-meta {
        flex-direction: column;
        gap: 5px;
    }
}