/**
 * Task Management Styles
 * Shared styles for task management, task types, task schedules, and tasks views
 */

/* ============================================
   Layout & Container Styles
   ============================================ */
.task-management-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

.task-content-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-content-header h4 i {
    color: #0891b2;
}

.task-content-body {
    padding: 0 1.5rem 1.5rem;
    background: #fff;
    border-radius: 0.5rem;
    margin: 0 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ============================================
   Stats Cards
   ============================================ */
.task-stats-card {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.task-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.task-icon-holder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-icon-holder i {
    font-size: 24px;
}

/* Dashboard card styles */
.task-dashboard-card {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-dashboard-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.task-dashboard-card .card {
    transition: all 0.2s ease;
    border-radius: 0.75rem;
    min-height: 280px;
}

.task-dashboard-card:hover .card {
    box-shadow: 0 0.5rem 1.5rem rgba(13, 110, 253, 0.15) !important;
}

.task-dashboard-card .icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.task-dashboard-card .icon-wrapper.icon-schedules {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.task-dashboard-card .icon-wrapper.icon-types {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.task-dashboard-card .icon-wrapper.icon-tasks {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.task-dashboard-card:hover .icon-wrapper {
    transform: scale(1.1);
}

.task-dashboard-card .icon-wrapper i {
    font-size: 2.5rem;
    color: #fff;
}

.task-dashboard-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.task-dashboard-card .card-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6c757d;
}

.task-dashboard-card:hover .card-title {
    color: #0891b2;
}

.task-dashboard-card .btn {
    pointer-events: none;
}

/* ============================================
   Table Styles
   ============================================ */
.task-table-wrapper {
    width: 100%;
    max-width: none;
    overflow: hidden;
    margin: 0;
    padding: 1rem 0;
}

.task-table-wrapper .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.task-table {
    border: none;
    width: 100%;
    margin-bottom: 0;
}

.task-table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    white-space: nowrap;
    background: #f8f9fa;
}

.task-table tbody tr {
    transition: all 0.2s;
    border-bottom: 1px solid #f1f3f5;
}

.task-table tbody tr:hover {
    background-color: #f8f9fa;
}

.task-table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

/* ============================================
   Badge Styles
   ============================================ */
.task-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.bg-info-subtle {
    background-color: #cff4fc !important;
}

.bg-warning-subtle {
    background-color: #fff3cd !important;
}

.bg-success-subtle {
    background-color: #d1e7dd !important;
}

.bg-secondary-subtle {
    background-color: #e2e3e5 !important;
}

.bg-danger-subtle {
    background-color: #f8d7da !important;
}

/* ============================================
   Tabs Styles
   ============================================ */
.task-tabs {
    border-bottom: 2px solid #dee2e6;
}

.task-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.task-tabs .nav-link:hover {
    color: #495057;
    background-color: #f8f9fa;
    border-bottom-color: #dee2e6;
}

.task-tabs .nav-link.active {
    color: #0891b2;
    background-color: transparent;
    border-bottom-color: #0891b2;
    font-weight: 600;
}

.task-tabs .nav-link .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* ============================================
   Pagination Styles
   ============================================ */
.task-pagination .page-link {
    border-radius: 0.25rem;
    margin: 0 2px;
}

.task-pagination .page-item.active .page-link {
    background-color: #0891b2;
    border-color: #0891b2;
}

/* ============================================
   Form Card Styles (Create/Edit)
   ============================================ */
.task-form-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.task-form-card .card-header {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #fff;
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1.25rem 1.5rem;
}

.task-form-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

.task-form-card .card-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.task-form-card .card-body {
    padding: 2rem;
}

.task-form-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.task-form-card .form-label .text-danger {
    margin-left: 2px;
}

.task-form-card .form-control,
.task-form-card .form-select {
    border-radius: 0.375rem;
    border-color: #dee2e6;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
}

.task-form-card .form-control:focus,
.task-form-card .form-select:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 0.2rem rgba(8, 145, 178, 0.15);
}

.task-form-card .form-text {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Form footer */
.task-form-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1.25rem 2rem;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Status toggle switch */
.task-status-switch {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.task-status-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

.task-status-switch .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.task-status-switch .form-check-label {
    font-weight: 500;
    margin-left: 0.5rem;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .task-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .task-content-header,
    .task-content-body {
        padding-left: 1rem;
        padding-right: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .task-stats-card .card-body {
        padding: 1rem;
    }

    .task-stats-card h3 {
        font-size: 1.5rem;
    }

    .task-dashboard-card .card {
        min-height: 240px;
    }

    .task-dashboard-card .icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .task-dashboard-card .icon-wrapper i {
        font-size: 2rem;
    }

    .task-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .task-tabs .nav-link {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    .task-form-card .card-body {
        padding: 1.5rem;
    }

    .task-form-footer {
        padding: 1rem 1.5rem;
    }
}

/* ============================================
   Animation Utilities
   ============================================ */
.task-fade-in {
    animation: taskFadeIn 0.3s ease-in-out;
}

@keyframes taskFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
