﻿/* Enhanced sorting and pagination controls */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

    .sort-controls label {
        font-weight: 600;
        color: #495057;
        margin: 0;
        white-space: nowrap;
    }

    .sort-controls select {
        padding: 0.5rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
        background: white;
        min-width: 150px;
    }

.page-size-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .page-size-controls label {
        font-weight: 600;
        color: #495057;
        margin: 0;
        white-space: nowrap;
    }

    .page-size-controls select {
        padding: 0.5rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
        background: white;
    }

/* NEW: Date range filter styling */
.date-range-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

    .date-range-filter .form-group {
        margin: 0;
    }

    .date-range-filter input[type="date"] {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
        background: white;
    }

.date-range-header {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

    .date-range-header h5 {
        margin: 0;
        color: #495057;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .date-range-header small {
        color: #6c757d;
        font-weight: normal;
    }

/* Enhanced pagination controls */
.enhanced-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

    .enhanced-pagination button {
        padding: 0.5rem 0.75rem;
        border: 1px solid #dee2e6;
        background: white;
        color: #495057;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.2s ease;
        min-width: 40px;
    }

        .enhanced-pagination button:hover:not(:disabled) {
            background: #e9ecef;
            border-color: #adb5bd;
        }

        .enhanced-pagination button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .enhanced-pagination button.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #6c757d;
    flex-wrap: wrap;
    gap: 1rem;
}

.quick-page-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .quick-page-jump input {
        width: 60px;
        padding: 0.25rem 0.5rem;
        border: 1px solid #ced4da;
        border-radius: 4px;
        text-align: center;
    }

.expired-info {
    color: #dc3545;
    font-weight: 500;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: #6c757d;
}

/* Prominent search actions styling */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.prominent-search-actions {
    display: flex;
    gap: 1rem;
}

    .prominent-search-actions .btn {
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
        border-radius: 8px;
        font-weight: 600;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

        .prominent-search-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

/* COMPACT Business Services Styling */
.service-search-compact {
    margin-top: 1.5rem;
    border-top: 2px solid #e9ecef;
    padding-top: 1.5rem;
}

.compact-service-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.business-toggle-card {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #90caf9;
}

.toggle-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

    .toggle-header input[type="checkbox"] {
        margin-top: 0.25rem;
        transform: scale(1.2);
        accent-color: #1565c0;
    }

.toggle-label {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

    .toggle-label strong {
        display: block;
        color: #1565c0;
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

.toggle-description {
    color: #666;
    font-size: 0.875rem;
}

.services-compact-container {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
}

.services-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.services-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-compact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

    .service-compact-item:hover {
        background: #e9ecef;
    }

    .service-compact-item input[type="checkbox"] {
        margin: 0;
        transform: scale(1.1);
        accent-color: #2c5aa0;
    }

.service-compact-label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-compact-name {
    font-weight: 500;
    color: #2c5aa0;
    font-size: 0.875rem;
}

.service-compact-count {
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: 0.5rem;
}

.more-services-details {
    margin: 1rem 0;
}

.more-services-toggle {
    cursor: pointer;
    color: #2c5aa0;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

    .more-services-toggle:hover {
        background: #e9ecef;
    }

.services-compact-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.service-summary {
    flex: 1;
}

.selected-count {
    font-weight: 600;
    color: #2c5aa0;
    font-size: 0.875rem;
}

.service-actions-row {
    display: flex;
    gap: 0.5rem;
}

.btn-service-action {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-service-action:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

.minimum-match-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f3f4;
}

    .minimum-match-compact label {
        font-size: 0.875rem;
        font-weight: 500;
        color: #495057;
        margin: 0;
    }

.compact-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.no-services-compact {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: #6c757d;
}

/* SUBTLE Search Tips Section */
.search-tips-section {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.search-tips-collapsible {
    background: #f8fafe;
    border: 1px solid #e3f2fd;
    border-radius: 8px;
    overflow: hidden;
}

.search-tips-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: #f8fafe;
    border: none;
    width: 100%;
    font-size: 1rem;
    font-weight: 500;
    color: #1565c0;
    transition: background-color 0.2s ease;
    list-style: none;
}

    .search-tips-header:hover {
        background: #e3f2fd;
    }

    .search-tips-header::-webkit-details-marker {
        display: none;
    }

.tips-title {
    flex: 1;
    text-align: left;
}

.tips-indicator {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.search-tips-collapsible[open] .tips-indicator {
    transform: rotate(180deg);
}

.search-tips-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    background: white;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.tip-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

    .tip-card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

.tip-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.tip-card h4 {
    margin: 0 0 0.75rem 0;
    color: #2c5aa0;
    font-size: 1rem;
    font-weight: 600;
}

.tip-card p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #555;
}

    .tip-card p:last-child {
        margin-bottom: 0;
    }

    .tip-card p strong {
        color: #333;
        font-weight: 600;
    }

.admin-tips {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e3f2fd;
    background: #fff3cd;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
}

    .admin-tips h4 {
        margin: 0 0 0.75rem 0;
        color: #856404;
        font-size: 1rem;
        font-weight: 600;
    }

.admin-tip-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

    .admin-tip-row p {
        margin: 0;
        font-size: 0.875rem;
        color: #856404;
        background: white;
        padding: 0.75rem;
        border-radius: 4px;
        border: 1px solid #ffeaa7;
    }

        .admin-tip-row p strong {
            color: #533a04;
        }

/* Service results display - integrated into regular results */
.services-info .services-display {
    margin-top: 0.5rem;
}

.service-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid #90caf9;
}

.service-badge {
    background: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Export functionality styles */
.export-section {
    position: relative;
}

.export-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

    .export-toggle.expanded {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

.export-arrow {
    transition: transform 0.2s ease;
}

.export-toggle.expanded .export-arrow {
    transform: rotate(180deg);
}

.export-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    padding: 1.5rem;
    width: 400px;
    z-index: 1000;
}

.export-header h4 {
    margin: 0 0 0.5rem 0;
    color: #2c5aa0;
    font-size: 1.1rem;
}

.export-subtitle {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.export-format-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

    .export-format-btn:hover {
        border-color: #2c5aa0;
        background: #f8f9ff;
    }

    .export-format-btn.selected {
        border-color: #2c5aa0;
        background: #e3f2fd;
    }

.format-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.format-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.format-desc {
    font-size: 0.75rem;
    color: #6c757d;
}

.export-columns h5 {
    margin: 0 0 0.75rem 0;
    color: #495057;
    font-size: 0.95rem;
}

.column-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

    .column-actions button {
        padding: 0.25rem 0.5rem;
        border: 1px solid #dee2e6;
        background: white;
        border-radius: 4px;
        cursor: pointer;
        font-size: 0.8rem;
        color: #495057;
    }

        .column-actions button:hover {
            background: #f8f9fa;
            border-color: #adb5bd;
        }

.column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.column-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .column-checkbox input[type="checkbox"] {
        margin: 0;
    }

    .column-checkbox label {
        margin: 0;
        font-size: 0.85rem;
        cursor: pointer;
    }

.export-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.selected-format {
    font-weight: 600;
    color: #2c5aa0;
    font-size: 0.9rem;
}

#executeExportBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-controls,
    .page-size-controls {
        justify-content: center;
    }

    .pagination-info {
        flex-direction: column;
        text-align: center;
    }

    .date-range-filter {
        grid-template-columns: 1fr;
    }

    .export-options {
        width: 90vw;
        right: -200px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .services-compact-grid {
        grid-template-columns: 1fr;
    }

    .admin-tip-row {
        grid-template-columns: 1fr;
    }

    .search-tips-header {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .compact-service-controls {
        gap: 0.75rem;
    }
}
