/* Biocomunica Tickets - Public Styles */

.biotickets-portal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.biotickets-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #007bff;
}

.biotickets-portal-header h2 {
    margin: 0;
    color: #333;
}

/* Botones */
.biotickets-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.biotickets-btn-primary {
    background: #007bff;
    color: #fff;
}

.biotickets-btn-primary:hover {
    background: #0056b3;
    color: #fff;
}

.biotickets-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.biotickets-btn-secondary:hover {
    background: #545b62;
    color: #fff;
}

/* Estadísticas */
.biotickets-tickets-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-box .stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-box .stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* No tickets */
.biotickets-no-tickets {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 30px 0;
}

.biotickets-no-tickets p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Tabla de tickets */
.biotickets-tickets-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

.biotickets-tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.biotickets-tickets-table thead {
    background: #007bff;
    color: #fff;
}

.biotickets-tickets-table th,
.biotickets-tickets-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.biotickets-tickets-table tbody tr {
    transition: background-color 0.2s;
}

.biotickets-tickets-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Estados y prioridades */
.biotickets-status,
.biotickets-priority {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.biotickets-status-abierto {
    background: #007bff;
    color: #fff;
}

.biotickets-status-en-progreso {
    background: #ffc107;
    color: #000;
}

.biotickets-status-pendiente {
    background: #17a2b8;
    color: #fff;
}

.biotickets-status-resuelto {
    background: #28a745;
    color: #fff;
}

.biotickets-status-cerrado {
    background: #6c757d;
    color: #fff;
}

.biotickets-priority-baja {
    background: #28a745;
    color: #fff;
}

.biotickets-priority-media {
    background: #ffc107;
    color: #000;
}

.biotickets-priority-alta {
    background: #ff6b6b;
    color: #fff;
}

.biotickets-priority-urgente {
    background: #dc3545;
    color: #fff;
}

/* Formulario */
.biotickets-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 30px auto;
}

.biotickets-form-row {
    margin-bottom: 25px;
}

.biotickets-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.biotickets-form-row input[type="text"],
.biotickets-form-row input[type="email"],
.biotickets-form-row select,
.biotickets-form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.biotickets-form-row input[type="file"] {
    width: 100%;
    padding: 10px 0;
}

.biotickets-form-row small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.biotickets-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

#biotickets-form-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

#biotickets-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#biotickets-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Vista de ticket */
.biotickets-ticket-view {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.biotickets-ticket-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    width: 200px;
    color: #333;
}

.biotickets-ticket-description {
    margin: 30px 0;
}

.biotickets-ticket-description h3 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.description-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    line-height: 1.6;
}

/* Adjuntos */
.biotickets-ticket-attachments {
    margin: 30px 0;
}

.biotickets-ticket-attachments h3 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.biotickets-ticket-attachments ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.biotickets-ticket-attachments li {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.biotickets-ticket-attachments a {
    color: #007bff;
    text-decoration: none;
}

.biotickets-ticket-attachments a:hover {
    text-decoration: underline;
}

/* Comentarios */
.biotickets-ticket-comments {
    margin: 30px 0;
}

.biotickets-ticket-comments h3 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.no-comments {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.comments-list {
    margin: 20px 0;
}

.comment {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-client {
    border-left: 4px solid #007bff;
}

.comment-staff {
    border-left: 4px solid #28a745;
    background: #f8fff8;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.comment-header strong {
    font-size: 15px;
    color: #333;
}

.comment-header .badge {
    background: #28a745;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.comment-date {
    margin-left: auto;
    font-size: 13px;
    color: #666;
}

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

/* Formulario de comentario */
.biotickets-comment-form {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.biotickets-comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
}

.biotickets-comment-form .form-actions {
    margin-top: 15px;
}

#comment-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

#comment-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#comment-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Base de conocimientos */
.biotickets-kb-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.biotickets-kb-search {
    text-align: center;
    margin-bottom: 40px;
}

.biotickets-kb-search h2 {
    margin-bottom: 20px;
}

.biotickets-kb-search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.biotickets-kb-search-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.biotickets-kb-search-form button {
    padding: 12px 30px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.biotickets-kb-article-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.biotickets-kb-article-item h3 {
    margin-top: 0;
}

.biotickets-kb-article-item h3 a {
    color: #333;
    text-decoration: none;
}

.biotickets-kb-article-item h3 a:hover {
    color: #007bff;
}

.biotickets-kb-article-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin: 10px 0;
}

/* SLA */
.sla-ok {
    color: #28a745;
    font-weight: 600;
}

.sla-warning {
    color: #ffc107;
    font-weight: 600;
}

.sla-critical {
    color: #ff6b6b;
    font-weight: 600;
}

.sla-breached {
    color: #dc3545;
    font-weight: 600;
}

/* Notices */
.biotickets-notice {
    padding: 15px 20px;
    border-radius: 4px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .biotickets-portal-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .biotickets-tickets-table {
        font-size: 14px;
    }
    
    .biotickets-tickets-table th,
    .biotickets-tickets-table td {
        padding: 10px;
    }
    
    .biotickets-form {
        padding: 20px;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-row .label {
        width: 100%;
        margin-bottom: 5px;
    }
}
