/* Parish Search - Styles */

.parish-search-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Search Form */
.parish-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.parish-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.parish-search-input:focus {
    border-color: #0073aa;
}

.parish-search-button {
    padding: 12px 24px;
    font-size: 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.parish-search-button:hover {
    background: #005a87;
}

.parish-search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Filter Tabs */
.parish-search-filters {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.parish-search-filter {
    padding: 6px 12px;
    font-size: 14px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.parish-search-filter:hover {
    background: #e0e0e0;
}

.parish-search-filter.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Filter Bar */
.parish-search-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.parish-search-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.parish-search-filter-group label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.parish-search-select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    min-width: 100px;
}

.parish-search-select:focus {
    border-color: #0073aa;
    outline: none;
}

.parish-search-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.parish-search-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.parish-search-sort-group {
    margin-left: auto;
}

/* Results */
.parish-search-results {
    margin-top: 20px;
}

.parish-search-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.parish-search-result {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

.parish-search-result:hover {
    border-color: #0073aa;
}

.parish-search-result-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.parish-search-result-type {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    flex-shrink: 0;
}

.parish-search-result-type.file {
    background: #e3f2fd;
    color: #1565c0;
}

.parish-search-result-type.post {
    background: #e8f5e9;
    color: #2e7d32;
}

.parish-search-result-type.page {
    background: #fff3e0;
    color: #ef6c00;
}

.parish-search-result-type.faq {
    background: #f3e5f5;
    color: #7b1fa2;
}

.parish-search-result-type.event {
    background: #e0f2f1;
    color: #00695c;
}

.parish-search-result-title {
    font-size: 18px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
    line-height: 1.3;
}

.parish-search-result-title:hover {
    text-decoration: underline;
}

.parish-search-result-content {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
}

.parish-search-result-content mark {
    background: #fff59d;
    padding: 0 2px;
}

.parish-search-result-meta {
    font-size: 12px;
    color: #888;
}

.parish-search-result-meta span {
    margin-right: 15px;
}

/* FAQ specific styles */
.parish-search-result-faq {
    border-left: 4px solid #7b1fa2;
}

.parish-search-result-question {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.parish-search-result-answer {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
}

/* Event specific styles */
.parish-search-result-event {
    border-left: 4px solid #00695c;
}

.parish-search-result-event-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 8px 0;
    font-size: 14px;
}

.parish-search-event-date {
    color: #00695c;
    font-weight: 500;
}

.parish-search-event-date::before {
    content: "\1F4C5 ";
}

.parish-search-event-location {
    color: #666;
}

.parish-search-event-location::before {
    content: "\1F4CD ";
}

/* Loading */
.parish-search-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.parish-search-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: parish-search-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes parish-search-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results / Error */
.parish-search-no-results,
.parish-search-error {
    text-align: center;
    padding: 30px;
    color: #666;
}

.parish-search-error {
    color: #c62828;
    background: #ffebee;
    border-radius: 4px;
}

/* Compact Search Bar (front page) */
.parish-search-bar {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.parish-search-bar-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.parish-search-bar-input:focus {
    border-color: #0073aa;
}

.parish-search-bar-button {
    padding: 10px 20px;
    font-size: 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.parish-search-bar-button:hover {
    background: #005a87;
}

/* Screen reader only text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .parish-search-form {
        flex-direction: column;
    }

    .parish-search-button {
        width: 100%;
    }

    .parish-search-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .parish-search-filter-group {
        justify-content: space-between;
    }

    .parish-search-select {
        flex: 1;
        min-width: 0;
    }

    .parish-search-sort-group {
        margin-left: 0;
    }

    .parish-search-result-header {
        flex-direction: column;
        gap: 5px;
    }

    .parish-search-bar {
        flex-direction: column;
    }

    .parish-search-bar-button {
        width: 100%;
    }
}
