/* Shared styles for grouped layouts (used in transaction-categories and transaction-categorization-rules pages) */

/* Jump Links */
.jump-links-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.jump-links-container.hidden {
    display: none;
}

.jump-links-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.jump-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jump-link {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 20px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.jump-link:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    text-decoration: none;
}

/* Grouped Layout Container */
.grouped-layout-group {
    margin-bottom: 40px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.grouped-layout-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px;
    border-bottom: 2px solid #5a67d8;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.grouped-layout-group-header:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.grouped-layout-group-title {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    flex: 1;
}

.grouped-layout-group-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

.grouped-layout-group-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.grouped-layout-group-actions .btn {
    font-size: 0.85rem;
    padding: 6px 12px;
}

/* Expand/Collapse Icons */
.expand-collapse-icon {
    display: inline-block;
    color: white;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    width: 16px;
    text-align: center;
    transform: rotate(90deg);
}

.expand-collapse-icon.collapsed {
    transform: rotate(0deg);
}

.grouped-layout-category-header .expand-collapse-icon {
    color: #495057;
}

.grouped-layout-group-content {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
    max-height: 10000px;
    opacity: 1;
}

.grouped-layout-group-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

/* Category Section (for rules page) */
.grouped-layout-category-section {
    border-bottom: 1px solid #e9ecef;
}

.grouped-layout-category-section:last-child {
    border-bottom: none;
}

.grouped-layout-category-header {
    background: #f8f9fa;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e9ecef;
    user-select: none;
}

.grouped-layout-category-header:hover {
    background: #e9ecef;
}

.grouped-layout-category-content {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
    max-height: 10000px;
    opacity: 1;
}

.grouped-layout-category-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.grouped-layout-category-title {
    margin: 0;
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.grouped-layout-count {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Data Tables */
.data-table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

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

.data-table tbody tr.search-hidden {
    display: none;
}

.data-table td {
    padding: 12px 16px;
    vertical-align: middle;
    color: #495057;
}

/* Category Indicator */
.category-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* Inline Actions */
.inline-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-actions .btn {
    padding: 4px 10px;
    font-size: 0.85rem;
}

/* Empty State Messages */
.empty-section-message {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.empty-section-message a {
    color: #007bff;
    text-decoration: underline;
}

/* Search Hidden */
.grouped-layout-group.search-hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .data-table-container {
        overflow-x: scroll;
    }

    .data-table {
        min-width: 600px;
    }

    .grouped-layout-group-header {
        padding: 16px 20px;
    }

    .grouped-layout-group-title {
        font-size: 1.3rem;
    }

    .grouped-layout-group-actions {
        flex-direction: column;
        gap: 4px;
    }

    .inline-actions {
        flex-direction: column;
    }

    .inline-actions .btn {
        width: 100%;
    }
}

