/* Live Search Preview Dropdown Styles */

.cards_header_search_form {
    position: relative;
    width: 100%;
}

.cards_header_search_bar {
    padding-right: 28px !important;
}

.cards_header_search_clear {
    float: left;
    height: 28px;
    width: 28px;
    margin: 16px 0 16px -28px;
    background: transparent;
    border: none;
    outline: none;
    color: dimgrey;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10pt;
    padding: 0;
    position: relative;
    z-index: 2;
    transition: color 0.15s ease;
}

.cards_header_search_clear:hover {
    color: #333;
}

/* Dropdown Container */
.cards_search_preview_dropdown {
    position: absolute;
    top: 44px;
    left: 0;
    width: calc(80% + 23px);
    max-width: 620px;
    min-width: 280px;
    background: #ffffff;
    box-shadow: 0px 6px 6px rgba(0, 0, 0, 0.24);
    border: 1px solid #dadce0;
    z-index: 1000;
    overflow: hidden;
    line-height: normal;
    text-align: left;
    box-sizing: border-box;
}

/* Loading Indicator */
.cards_search_preview_loader {
    height: 2px;
    width: 100%;
    background-color: #e8f0fe;
    position: relative;
    overflow: hidden;
}

.cards_search_preview_loader_bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background-color: #3399CC;
    animation: search_preview_pulse 1.2s infinite ease-in-out;
}

@keyframes search_preview_pulse {
    0% {
        left: 0;
        width: 0;
    }
    50% {
        left: 25%;
        width: 75%;
    }
    100% {
        left: 100%;
        width: 0;
    }
}

/* Rubric Section */
.cards_search_preview_rubric {
    display: block;
}

.cards_search_preview_rubric + .cards_search_preview_rubric {
    border-top: 1px solid #f1f3f4;
}

.cards_search_preview_rubric_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 4px;
    font-size: 9pt;
    line-height: 24px;
    color: dimgrey;
}

.cards_search_preview_rubric_title {
    display: inline-block;
    text-transform: uppercase;
}

/* Items List */
.cards_search_preview_list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px 0;
}

.cards_search_preview_item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.1s ease;
}

.cards_search_preview_item:hover,
.cards_search_preview_item.is-active {
    background-color: #f3f3f3;
}

/* Left Icon */
.cards_search_preview_icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 10pt;
    flex-shrink: 0;
    background-color: #f3f3f3;
    color: dimgrey;
}

/* Content Details */
.cards_search_preview_content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cards_search_preview_title {
    font-size: 10pt;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.cards_search_preview_breadcrumb {
    font-size: 8pt;
    color: dimgrey;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty State */
.cards_search_preview_empty {
    padding: 24px 16px;
    text-align: center;
    color: dimgrey;
    font-size: 9pt;
}

/* Footer Helper */
.cards_search_preview_footer {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #f1f3f4;
    font-size: 8pt;
    color: dimgrey;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media screen and (max-width: 768px) {
    .cards_header_search_form {
        position: static;
    }

    .cards_search_preview_dropdown {
        top: 44px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-left: none;
        border-right: none;
        max-height: calc(100vh - 50px);
        overflow-y: auto;
    }
}

/* Categories Search Results Page Styles */
.cards__category_search_domain_section {
    margin-top: 24px;
    margin-bottom: 24px;
}

.cards__category_search_empty_section {
    width: 100%;
    text-align: center;
    padding: 48px 20px;
}

.cards_stacks_empty_wrapper {
    background-color: transparent !important;
}

.cards__category_search_empty_card {
    max-width: 480px;
    margin: 0 auto;
}

.cards__category_search_empty_text {
    font-size: 10pt;
    color: dimgrey;
    margin-bottom: 20px;
}

.cards__category_search_empty_actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

/* Categories & Stacks Main Search Bar Section (centered under header) */
.cards__category_search_bar_section {
    padding: 0;
}

.cards__category_main_search_form {
    display: flex;
    align-items: center;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    background-color: white;
    border: 1px solid #3399CC;
    box-shadow: 0px 2px 6px rgba(51, 153, 204, 0.25);
    box-sizing: border-box;
}

.cards__category_main_search_form:focus-within {
    border-color: #3399CC;
    box-shadow: 0px 2px 8px rgba(51, 153, 204, 0.35);
}

.cards__category_main_search_button {
    height: 36px;
    width: 36px;
    background-color: transparent;
    border: none;
    color: #3399CC;
    cursor: pointer;
    font-size: 10pt;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.cards__category_main_search_button:hover {
    color: #26739a;
}

.cards__category_main_search_input {
    height: 36px;
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 10pt;
    color: dimgrey;
    padding: 0 12px 0 4px;
    box-sizing: border-box;
}

.cards__category_main_search_input::placeholder {
    color: grey;
    font-size: 9pt;
}

@media screen and (max-width: 768px) {
    .cards__category_main_search_form {
        max-width: 100%;
    }
}
