/* SEARCH.CSS */

/* =========================================
   SEARCH
========================================= */

/* -----------------------------------------
   MOBILE ACTIONS IN NAVBAR
----------------------------------------- */

.mobile-actions {
    gap: 0.15rem;
}

.base-nav-panel .search-mobile-trigger {
    padding: 0.5rem 0.65rem;
    line-height: 1;
    border: none;
    background: transparent;
}

.base-nav-panel .search-mobile-icon {
    font-size: 1.2rem;
    color: #84aa32ff;
    transition: color 0.4s ease;
}

.base-nav-panel .search-mobile-trigger:hover .search-mobile-icon,
.base-nav-panel .search-mobile-trigger:focus .search-mobile-icon,
.base-nav-panel .search-mobile-trigger:active .search-mobile-icon {
    color: #006699ff;
}

/* -----------------------------------------
   COMMON SEARCH CONTROLS
----------------------------------------- */

.search-input:focus {
    outline: none;
    box-shadow: none;
}

.submit-button:hover {
    background-color: #06a1f5;
}

.search-button {
    font-size: 30px;
    z-index: 1;
    margin-right: 1.875rem;
    color: #84aa32ff;
    border: none;
    outline: none;
    background: transparent;
    transition: color 0.4s ease;
}

.search-button i {
    color: inherit;
    transition: color 0.4s ease;
}

.search-button:hover,
.search-button:hover i,
.search-button:focus,
.search-button:focus i,
.search-button:active,
.search-button:active i {
    color: #006699ff;
    outline: none;
    background: transparent;
}

/* -----------------------------------------
   DESKTOP EXPANDABLE SEARCH
----------------------------------------- */

.search-form[data-search-mode="expandable"] {
    position: relative;
    flex-grow: 1;
    justify-content: end;
    align-items: center;
    margin-left: 0.5rem;
}

.search-form[data-search-mode="expandable"] .search-input {
    width: 0;
    opacity: 0;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    transition: opacity 0.75s ease, transform 0.75s ease, width 0s;
    animation: none;
    border-right-width: 0;
    border-right-style: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-form[data-search-mode="expandable"] .search-input.active {
    animation: expandWidth 0.75s ease forwards;
    opacity: 1;
}

.search-form[data-search-mode="expandable"] .search-input.closing {
    animation: collapseWidth 0.75s ease forwards;
    opacity: 0;
}

.search-form[data-search-mode="expandable"] .submit-button {
    display: none;
    margin-left: 0;
    text-align: center;
    text-decoration: none;
    border-radius: 0.3125rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    position: relative;
    line-height: 1.625rem;
}

.search-form[data-search-mode="expandable"] .search-input.active+.submit-button {
    opacity: 1;
    transition: opacity 0.3s ease;
    background-color: #06a1f5;
    color: #006699ff;
}

/* -----------------------------------------
   MOBILE SEARCH MODAL
----------------------------------------- */

.mobile-search-modal .modal-content {
    background-color: #f8f6f1;
    border: 0;
    border-radius: 0;
}

.mobile-search-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e2da;
}

.mobile-search-body {
    padding: 1rem;
}

.mobile-search-form {
    width: 100%;
    display: block;
}

.mobile-search-input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
}

.mobile-search-input {
    display: block;
    width: 100%;
    min-height: 3rem;
    opacity: 1;
    transform: none;
    animation: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
}

.mobile-search-input:focus {
    box-shadow: none;
}

.mobile-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: #06a1f5;
    color: #006699ff;
}

.mobile-search-submit:hover,
.mobile-search-submit:focus,
.mobile-search-submit:active {
    background-color: #06a1f5;
    color: #006699ff;
}

.mobile-search-results {
    margin-top: 1rem;
}

/* -----------------------------------------
   ANIMATIONS
----------------------------------------- */

@keyframes expandWidth {
    0% {
        width: 0;
        transform: scaleX(0.4);
    }

    100% {
        width: 100%;
        transform: scaleX(1);
    }
}

@keyframes collapseWidth {
    0% {
        width: 100%;
        transform: scaleX(1);
        opacity: 1;
    }

    100% {
        width: 0;
        transform: scaleX(0);
        opacity: 0;
    }
}