/* Unified Modal Design System - Based on My Boards styling */

/* Import Figtree font for consistency */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&display=swap');

/* Base Modal Styling */
.unified-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.unified-modal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.unified-modal .modal-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: #333;
    display: flex;
    align-items: center;
}

.unified-modal .modal-title i {
    margin-right: 0.75rem;
    color: #0d6efd;
}

.unified-modal .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.unified-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Unified Card Layout System */
.unified-item-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.unified-item-card:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    cursor: pointer;
}

.unified-item-card.active {
    border-left: 4px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    border-color: rgba(13, 110, 253, 0.2);
}

/* Card Grid for Boards */
.unified-card-grid {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
}

/* Custom scrollbar for card grid */
.unified-card-grid::-webkit-scrollbar {
    width: 6px;
}

.unified-card-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.unified-card-grid::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 3px;
}

.unified-card-grid::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Firefox scrollbar */
.unified-card-grid {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

/* Item Header */
.unified-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.unified-item-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.unified-item-subtitle {
    font-family: 'Figtree', sans-serif;
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
}

/* Item Content */
.unified-item-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Item Meta Information */
.unified-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #868e96;
}

.unified-meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.unified-meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Badges and Labels */
.unified-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.7rem;
    font-family: 'Figtree', sans-serif;
    display: inline-flex;
    align-items: center;
}

.unified-badge-primary {
    background: #e7f3ff;
    color: #0d6efd;
}

.unified-badge-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.unified-badge.priority-high {
    background: #ffe6e6;
    color: #dc3545;
}

.unified-badge.priority-medium {
    background: #fff3e6;
    color: #fd7e14;
}

.unified-badge.priority-low {
    background: #e6ffe6;
    color: #198754;
}

.unified-badge.board-badge {
    background: #e7f3ff;
    color: #0d6efd;
}

.unified-badge.status-badge {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Action Buttons */
.unified-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.unified-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Figtree', sans-serif;
    cursor: pointer;
    line-height: 1.4;
}

.unified-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.unified-btn i {
    margin-right: 0.375rem;
    font-size: 0.9rem;
}

.unified-btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.2);
}

.unified-btn-primary:hover:not(:disabled) {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25);
}

.unified-btn-outline {
    background-color: transparent;
    border-color: #dee2e6;
    color: #6c757d;
}

.unified-btn-outline:hover:not(:disabled) {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

.unified-btn-sm {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    min-height: 32px;
    min-width: 32px;
}

.unified-btn-sm i {
    font-size: 0.95rem;
}

.unified-btn-icon-only {
    padding: 0.4rem;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
}

.unified-btn-icon-only i {
    margin: 0;
    font-size: 1rem;
}

/* List Layout (Alternative to Cards) */
.unified-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.unified-list-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    min-height: 80px;
}

.unified-list-item:last-child {
    margin-bottom: 0.5rem;
}

.unified-list-item:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.unified-list-content {
    flex: 1;
    margin-right: 1.5rem;
    min-width: 0;
}

.unified-list-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    word-wrap: break-word;
}

.unified-list-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.unified-item-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Item Meta Information */
.unified-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.unified-meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* List Container for scrollable content */
.unified-list-container {
    max-height: 60vh;
    min-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
    margin-right: -8px;
    border-radius: 8px;
}

.unified-list-container::-webkit-scrollbar {
    width: 8px;
}

.unified-list-container::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
    margin: 4px;
}

.unified-list-container::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
    min-height: 20px;
}

.unified-list-container::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

.unified-list-container::-webkit-scrollbar-corner {
    background: #f1f3f4;
}

.unified-list-container {
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f3f4;
}

/* Table Styling (For My Tasks) */
.unified-table {
    width: 100%;
    margin-bottom: 0;
    background-color: transparent;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.unified-table thead th {
    background: #f8f9fa;
    border: none;
    padding: 1rem 0.75rem;
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 2px solid #dee2e6;
}

.unified-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.unified-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

.unified-table tbody tr {
    transition: all 0.15s ease;
    border-bottom: 1px solid #e9ecef;
}

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

.unified-table tbody tr:last-child {
    border-bottom: none;
}

.unified-table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

.unified-table-title {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
}

.unified-table-subtitle {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

/* Search and Filter Bar */
.unified-search-bar {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.unified-search-input {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-family: 'Figtree', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
}

.unified-search-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Empty State */
.unified-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.unified-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.unified-empty-state h5 {
    font-family: 'Figtree', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.unified-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

/* Loading State */
.unified-loading {
    text-align: center;
    padding: 2rem 1rem;
}

.unified-loading .spinner-border {
    color: #0d6efd;
    margin-bottom: 1rem;
}

/* Pagination */
.unified-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.unified-pagination-info {
    font-size: 0.875rem;
    color: #6c757d;
    font-family: 'Figtree', sans-serif;
}

.unified-pagination-controls {
    display: flex;
    gap: 0.5rem;
}

/* Priority Indicators */
.unified-priority-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 8px 0 0 8px;
}

.unified-priority-indicator.high {
    background-color: #dc3545;
}

.unified-priority-indicator.medium {
    background-color: #fd7e14;
}

.unified-priority-indicator.low {
    background-color: #198754;
}

.unified-priority-indicator.na {
    background-color: #0d6efd;
}

/* Search Highlighting */
.unified-search-highlight {
    background: #fff59d;
    font-weight: 600;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

/* Dark Mode Support */
html[data-bs-theme="dark"] .unified-modal .modal-content {
    background: #212529;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .unified-modal .modal-header,
html[data-bs-theme="dark"] .unified-modal .modal-footer {
    background: #2c3034;
    border-color: #495057;
}

html[data-bs-theme="dark"] .unified-item-card {
    background: #2c3034;
    border-color: #495057;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .unified-item-card:hover {
    background: #3a3f44;
    border-color: #6c757d;
}

html[data-bs-theme="dark"] .unified-item-title {
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .unified-table {
    background: #2c3034;
}

html[data-bs-theme="dark"] .unified-table thead th {
    background: #2c3034;
    color: #f8f9fa;
    border-color: #495057;
}

html[data-bs-theme="dark"] .unified-table tbody tr:hover {
    background: #3a3f44;
}

html[data-bs-theme="dark"] .unified-table tbody tr {
    border-color: #495057;
}

html[data-bs-theme="dark"] .unified-table tbody td {
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .unified-search-bar {
    background: #2c3034;
    border-color: #495057;
}

html[data-bs-theme="dark"] .unified-search-input {
    background: #212529;
    border-color: #495057;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .unified-search-input:focus {
    border-color: #0d6efd;
}

html[data-bs-theme="dark"] .unified-card-grid::-webkit-scrollbar-track,
html[data-bs-theme="dark"] .unified-list-container::-webkit-scrollbar-track {
    background: #495057;
}

html[data-bs-theme="dark"] .unified-card-grid::-webkit-scrollbar-thumb,
html[data-bs-theme="dark"] .unified-list-container::-webkit-scrollbar-thumb {
    background: #58a6ff;
}

html[data-bs-theme="dark"] .unified-card-grid::-webkit-scrollbar-thumb:hover,
html[data-bs-theme="dark"] .unified-list-container::-webkit-scrollbar-thumb:hover {
    background: #316dca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .unified-modal .modal-body {
        padding: 1rem;
    }
    
    .unified-item-card {
        padding: 1rem;
    }
    
    .unified-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .unified-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .unified-table {
        font-size: 0.8rem;
    }
    
    .unified-table thead th,
    .unified-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .unified-card-grid,
    .unified-list-container {
        max-height: 250px;
    }
} 