/* Search Module Styles */

/* Search Modal Styles */
#searchModal .modal-content {
    border-radius: 8px;
}

#searchModal .modal-body {
    padding: 0;
}

/* Joomla mod_search and mod_finder form styling */
#searchModal .search form,
#searchModal .mod-finder {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#searchModal .search input[type="search"],
#searchModal .search input.inputbox,
#searchModal .search input.search-query,
#searchModal .mod-finder .js-finder-search-query {
    flex: 1;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#searchModal .search input[type="search"]:focus,
#searchModal .search input.inputbox:focus,
#searchModal .mod-finder .js-finder-search-query:focus {
    border-color: var(--color-accent, #000066);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 102, 0.25);
}

/* mod_finder specific styles */
#searchModal .mod-finder label.finder {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#searchModal .mod-finder .awesomplete {
    flex: 1;
    position: relative;
}

#searchModal .mod-finder .awesomplete ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

#searchModal .mod-finder .awesomplete li {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#searchModal .mod-finder .awesomplete li:hover,
#searchModal .mod-finder .awesomplete li[aria-selected="true"] {
    background-color: var(--color-accent, #000066);
    color: #fff;
}

#searchModal .mod-finder .awesomplete mark {
    background-color: rgba(0, 0, 102, 0.2);
    color: inherit;
    padding: 0;
}

/* Hide hidden inputs properly */
#searchModal .search input[type="hidden"] {
    display: none;
}

.search__wrapper {
    position: relative;
}

@media (max-width: 991.98px) {
    .search__wrapper {
        position: relative;
    }
}


.search__toggle, .search__submit {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 0 5px;
    border: none;
    background: none;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.search__toggle:hover, .search__submit:hover {
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
    transform: scale(1.1);
}

.search__toggle svg, .search__submit svg {
    width: 17px;
    height: 17px;
    fill: #fff;
}


.search__submit {
    position: absolute;
    top: 50%;
    right: 10px;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

.search__submit:hover {
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

.search__submit svg {
    fill: var(--color-dark);
}



/* ================================================
   com_finder Search Results Page Styles
   ================================================ */

/* Search form on results page */
.com-finder__form {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background-color: #f8f9fa;
	border-radius: 0;
}

.com-finder__form .input-group {
	max-width: 600px;
}

.com-finder__form .form-control {
	border-radius: 0;
	border: 1px solid #dee2e6;
	padding: 0.75rem 1rem;
}

.com-finder__form .form-control:focus {
	border-color: var(--color-accent, #000066);
	box-shadow: 0 0 0 0.2rem rgba(0, 0, 102, 0.15);
}

.com-finder__form .btn-primary {
	background-color: var(--color-accent, #000066);
	border-color: var(--color-accent, #000066);
	border-radius: 0;
}

.com-finder__form .btn-primary:hover {
	background-color: #000044;
	border-color: #000044;
}

.com-finder__form .btn-secondary {
	border-radius: 0;
}

/* Hide redundant label */
.com-finder__form > label.finder {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Results container */
.com-finder__results {
	padding-top: 1rem;
}

/* Results list */
.com-finder__results .com-finder__results-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.com-finder__results .result__item {
	padding: 1.5rem 0;
	border-bottom: 1px solid #e9ecef;
}

.com-finder__results .result__item:last-child {
	border-bottom: none;
}

/* Result item title */
.com-finder__results .result__title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.com-finder__results .result__title a {
	color: var(--color-accent, #000066);
	text-decoration: none;
}

.com-finder__results .result__title a:hover {
	text-decoration: underline;
}

/* Result description */
.com-finder__results .result__description {
	color: #495057;
	line-height: 1.6;
	margin-bottom: 0.5rem;
}

/* Result URL */
.com-finder__results .result__title-url {
	display: block;
	color: #17a2b8;
	font-size: 0.875rem;
	word-break: break-all;
}

/* No results message */
.com-finder .alert,
.com-finder__empty {
	text-align: center;
	padding: 2rem;
}

/* Highlight search terms */
.com-finder__results mark {
	background-color: rgba(0, 0, 102, 0.15);
	color: inherit;
	padding: 0.1em 0.2em;
	border-radius: 2px;
}


/* Pagination */
.com-finder__results .pagination,
.com-finder__pagination .pagination {
	justify-content: center;
	margin-top: 2rem;
}

/* Responsive */
@media (max-width: 767.98px) {
	.com-finder__form {
		padding: 1rem;
	}

	.com-finder__results .result__title {
		font-size: 1.125rem;
	}
}
