/* 
Este es el archivo CSS principal del plugin PomodoTrack
Contiene todos los estilos necesarios para la aplicación
*/

:root {
    --primary: #e74c3c;
    --secondary: #2ecc71;
    --third: #3498db;
    --dark: #333;
    --light: #f5f5f5;
}

/* Tema claro (default) */
.pomodotrack-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tema oscuro */
.pomodotrack-container.dark {
    background-color: #222;
    color: #f5f5f5;
}

.pomodotrack-container.dark .tab-button {
    background-color: #444;
    color: #f5f5f5;
}

.pomodotrack-container.dark .tab-button.active {
    background-color: var(--primary);
}

/* Header */
.pomodotrack-header {
    text-align: center;
    margin-bottom: 30px;
}

.pomodotrack-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

/* Navegación */
.pomodotrack-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    margin: 0 5px;
    background-color: var(--light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.tab-button.active {
    background-color: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Temporizador */
.timer-container {
    text-align: center;
    margin-bottom: 30px;
}

.timer {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary);
    margin: 20px 0;
}

.timer-mode {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.start-btn {
    background-color: var(--secondary);
    color: white;
}

.pause-btn {
    background-color: var(--third);
    color: white;
}

.reset-btn {
    background-color: var(--primary);
    color: white;
}

.mode-buttons {
    margin-bottom: 20px;
}

/* Formulario de tarea */
.task-form {
    margin-bottom: 20px;
}

.task-form input, .task-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Tablas */
.task-table {
    width: 100%;
    border-collapse: collapse;
}

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

.task-table th {
    background-color: var(--light);
}

/* Gráficos */
.chart-container {
    height: 400px;
    margin-top: 30px;
}

/* Selector de fecha */
.date-selector {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Contenedor de tiempo total */
.total-time-container {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* Footer */
.pomodotrack-footer {
    text-align: center;
    margin-top: 30px;
    color: #777;
    font-size: 0.9rem;
}

/* Configuración */
.settings-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Estilos para el desplegable de tareas */
.task-row {
    cursor: pointer;
}

.task-row:hover {
    background-color: rgba(231, 76, 60, 0.05);
}

.task-details {
    display: none;
    background-color: #f9f9f9;
    padding: 10px;
    border-left: 3px solid var(--primary);
}

.task-details.open {
    display: table-row;
}

.task-details-content {
    padding: 15px;
}

.pomodoro-list {
    list-style: none;
    padding: 0;
}

.pomodoro-item {
    border-bottom: 1px dashed #ddd;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
}

.pomodoro-item:last-child {
    border-bottom: none;
}

.task-indicator {
    display: inline-block;
    margin-right: 5px;
    transition: transform 0.3s;
}

.task-row.open .task-indicator {
    transform: rotate(90deg);
}

.no-pomodoros {
    font-style: italic;
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    .pomodotrack-nav {
        flex-wrap: wrap;
    }
    
    .tab-button {
        margin-bottom: 5px;
    }
    
    .timer {
        font-size: 4rem;
    }
    
    .task-form input, .task-form select {
        width: 100%;
        margin-right: 0;
    }
    
    .task-form button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .stats-controls {
        flex-direction: column;
    }
    
    .date-selector {
        margin-bottom: 10px;
    }
}
/**
 * Correcciones para los estilos CSS de los gráficos
 * Añade estos estilos a tu archivo CSS existente (pomodotrack.css)
 */

/* Estilos mejorados para los contenedores de gráficos */
.chart-container {
    position: relative;
    flex: 1 1 calc(50% - 20px);
    min-width: 300px;
    height: 300px;
    margin: 10px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark .chart-container {
    background-color: #333;
    border-color: #444;
}

.chart-container h3 {
    margin-top: 0;
    text-align: center;
    color: #444;
    font-size: 16px;
    margin-bottom: 15px;
}

.dark .chart-container h3 {
    color: #eee;
}

.stats-charts {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: space-between;
}

/* Estilos para hacer los gráficos más compactos */
#time-chart, #category-chart, #tasks-chart {
    width: 100% !important;
    height: 200px !important;
    max-height: 250px;
}

/* Estilos para estadísticas */
.stats-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    flex: 1;
    margin: 0 10px;
    max-width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .stat-box {
    background-color: #333;
}

.stat-box h3 {
    margin-top: 0;
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.dark .stat-box h3 {
    color: #ccc;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.dark .stat-value {
    color: #ff6b6b;
}

/* Estilos para la tabla de estadísticas */
.stats-details {
    margin-bottom: 30px;
    overflow-x: auto;
}

.stats-details h3 {
    margin-bottom: 15px;
    color: #444;
}

.dark .stats-details h3 {
    color: #eee;
}

.pomodotrack-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.pomodotrack-table th {
    background-color: #f5f5f5;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.dark .pomodotrack-table th {
    background-color: #333;
    border-bottom-color: #444;
}

.pomodotrack-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.dark .pomodotrack-table td {
    border-bottom-color: #444;
}

.pomodotrack-table tr:hover {
    background-color: #f9f9f9;
}

.dark .pomodotrack-table tr:hover {
    background-color: #2a2a2a;
}

/* 
=== ESTILOS ADICIONALES PARA POMODOTRACK ===
Agrega estos estilos al final de tu archivo pomodotrack.css existente
*/

/* Sección de registro de tareas integrada en estadísticas */
.tasks-register-section {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.dark .tasks-register-section {
    background-color: #2a2a2a;
    border-color: #444;
}

.tasks-register-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

/* Mejorar la visualización de la tabla de tareas */
.task-table {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.dark .task-table {
    background-color: #333;
}

.task-table th {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.task-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.dark .task-table tr:nth-child(even) {
    background-color: #2a2a2a;
}

/* Fila de totales especial */
.task-table .total-row {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee) !important;
    font-weight: bold;
    border-top: 2px solid var(--primary);
}

.dark .task-table .total-row {
    background: linear-gradient(135deg, #444, #333) !important;
}

/* Estilos para filas expandibles en la tabla de estadísticas */
.task-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.task-row:hover {
    background-color: rgba(231, 76, 60, 0.08);
}

.dark .task-row:hover {
    background-color: rgba(231, 76, 60, 0.15);
}

/* Iconos de expansión */
.expand-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    font-weight: bold;
}

.expand-icon:hover {
    transform: scale(1.2);
}

/* Detalles de pomodoros expandidos */
.pomodoro-details {
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary);
}

.dark .pomodoro-details {
    background-color: #2a2a2a;
}

.pomodoro-details-content {
    padding: 15px 20px;
    margin-left: 20px;
}

.pomodoro-details-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.pomodoro-detail {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .pomodoro-detail {
    background-color: #333;
}

.pomodoro-detail div:first-child {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.pomodoro-detail div:not(:first-child) {
    font-size: 0.9rem;
    color: #666;
}

.dark .pomodoro-detail div:not(:first-child) {
    color: #ccc;
}

/* Mejorar la navegación de fechas */
.date-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.date-selector button {
    background: linear-gradient(135deg, var(--primary), #c0392b);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-selector button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.date-selector span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
    min-width: 200px;
    text-align: center;
}

.dark .date-selector span {
    color: #eee;
}

/* Mejorar los controles de estadísticas */
.stats-controls {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.dark .stats-controls {
    background-color: #2a2a2a;
    border-color: #444;
}

.stats-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 0.9rem;
}

.dark .stats-controls select {
    background-color: #333;
    color: #eee;
    border-color: #555;
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .tasks-register-section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .date-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-selector span {
        min-width: auto;
    }
    
    .stats-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .task-table {
        font-size: 0.85rem;
    }
    
    .task-table th,
    .task-table td {
        padding: 8px 5px;
    }
    
    .pomodoro-details-content {
        margin-left: 10px;
        padding: 10px 15px;
    }
}

/* Animaciones suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pomodoro-details {
    animation: fadeIn 0.3s ease-out;
}

/* Estados de carga y vacío */
.loading-message, .empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.dark .loading-message, .dark .empty-message {
    color: #ccc;
}
/* Mejoras para gestión de tareas */
#task-search-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.task-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.task-search-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.task-search-input::placeholder {
    color: #999;
}

.delete-task-button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.delete-task-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.delete-task-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Tema oscuro */
.dark-theme .task-search-input {
    background: #34495e;
    color: #ecf0f1;
    border-color: #2c3e50;
}

.dark-theme .task-search-input:focus {
    border-color: #e74c3c;
}