/**
 * DBC Custom Searchbar Styles
 * IMDb-like design for searchbar and results
 */

/* Searchbar Wrapper */
.dbc-searchbar-wrapper {
    position: relative;
    width: 100%;
}

.dbc-searchbar-wrapper *:focus {
    outline: none !important;
}

.dbc-searchbar-form {
    position: relative;
}
/* Input Wrapper */
.dbc-searchbar-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid rgba(120, 100, 80, 0.25);
    border-radius: 25px;
    background: rgba(60, 50, 40, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dbc-searchbar-input-wrapper:focus-within {
    border-color: rgba(140, 120, 100, 0.4) !important;
    background: rgba(60, 50, 40, 0.45);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.dbc-searchbar-input {
    flex: 1;
    padding: 4px 16px !important;
    border: none !important;
    outline: none !important;
    font-size: 15px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.4;
}

.dbc-searchbar-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dbc-searchbar-input::placeholder {
    color: rgba(120, 110, 100, 0.8);
    font-weight: 400;
}

/* Native clear button (X) styling - dark color for visibility on light background */
.dbc-searchbar-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 4px;
    opacity: 1;
}

.dbc-searchbar-input::-webkit-search-cancel-button:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.75)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.75)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Firefox clear button */
.dbc-searchbar-input::-moz-search-clear-button {
    width: 20px;
    height: 20px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 4px;
}

.dbc-searchbar-submit {
    padding: 4px 12px !important;
    border: none;
    background: transparent !important;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    margin: 0;
    flex-shrink: 0;
}

.dbc-searchbar-submit:hover {
    color: rgba(255, 255, 255, 0.8);
    background: transparent !important;
}

.dbc-searchbar-submit:active {
    color: rgba(255, 255, 255, 0.9);
    background: transparent !important;
}

.dbc-searchbar-submit:focus {
    outline: none;
}

.dbc-searchbar-submit svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    stroke: currentColor;
}

/* Microphone Button */
.dbc-searchbar-mic {
    padding: 4px 8px !important;
    border: none;
    background: transparent !important;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    margin: 0;
    flex-shrink: 0;
    position: relative;
}

.dbc-searchbar-mic:hover {
    color: rgba(255, 255, 255, 0.8);
    background: transparent !important;
}

.dbc-searchbar-mic:active {
    color: rgba(255, 255, 255, 0.9);
    background: transparent !important;
}

.dbc-searchbar-mic:focus {
    outline: none;
}

.dbc-searchbar-mic svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5;
    stroke: currentColor;
}

/* Show/hide icons based on state */
.dbc-searchbar-mic .dbc-mic-listening-icon {
    display: none;
}

.dbc-searchbar-mic.dbc-mic-listening .dbc-mic-icon {
    display: none;
}

.dbc-searchbar-mic.dbc-mic-listening .dbc-mic-listening-icon {
    display: block;
    color: #e74c3c;
    animation: dbc-mic-pulse 1s ease-in-out infinite;
}

@keyframes dbc-mic-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Dark Theme Variant - use [dbc_searchbar theme="dark"] */
.dbc-searchbar-dark .dbc-searchbar-input-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dbc-searchbar-dark .dbc-searchbar-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.dbc-searchbar-dark .dbc-searchbar-input {
    color: #333;
}

.dbc-searchbar-dark .dbc-searchbar-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.dbc-searchbar-dark .dbc-searchbar-submit,
.dbc-searchbar-dark .dbc-searchbar-mic {
    color: rgba(255, 255, 255, 0.6);
}

.dbc-searchbar-dark .dbc-searchbar-submit:hover,
.dbc-searchbar-dark .dbc-searchbar-mic:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Dark theme clear button - use dark color for visibility on light background */
.dbc-searchbar-dark .dbc-searchbar-input::-webkit-search-cancel-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.dbc-searchbar-dark .dbc-searchbar-input::-webkit-search-cancel-button:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.75)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.75)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.dbc-searchbar-dark .dbc-searchbar-input::-moz-search-clear-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cline x1='18' y1='6' x2='6' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3Cline x1='6' y1='6' x2='18' y2='18' stroke='rgba(0,0,0,0.5)' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.dbc-searchbar-dark .dbc-searchbar-mic.dbc-mic-listening .dbc-mic-listening-icon {
    color: #f5c518;
}

/* Results Container */
.dbc-searchbar-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 700px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    visibility: hidden;
}

.dbc-searchbar-results.dbc-results-visible {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dbc-search-results-list {
    padding: 0;
    margin: 0;
}

/* Results Group */
.dbc-search-results-group {
    margin-bottom: 16px;
    margin-top: 0;
    padding: 0;
}

.dbc-search-results-group:first-child {
    margin-top: 0;
}

.dbc-search-results-group:last-child {
    margin-bottom: 0;
}

.dbc-search-results-group:last-child .dbc-search-result-book:last-child,
.dbc-search-results-group:last-child .dbc-search-result-person:last-child {
    margin-bottom: 0;
}

/* Subtitle wrapper for flexbox layout */
.dbc-search-results-subtitle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
}

/* Subtitle for result groups */
.dbc-search-results-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    flex: 1;
}

/* Minimalistic icon button for search results headers */
.dbc-search-header-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #999;
    text-decoration: none;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.dbc-search-header-button svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dbc-search-header-button:hover {
    color: #666;
    text-decoration: none;
}

.dbc-search-header-button:active {
    transform: translateY(1px);
}

/* Special styling for Trending Searches subtitle - keep original padding */
.dbc-trending-group .dbc-search-results-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #f5c518;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    background: transparent;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
}

/* Book Result Item */
.dbc-search-result-item {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border: none !important;
}

.dbc-search-result-item:hover {
    background: #f5f5f5;
}

/* Book result in dropdown (no card styling) */
.dbc-searchbar-results .dbc-search-result-book {
    display: flex;
    padding: 12px 0 12px 0; /* No horizontal padding - cover margins handle spacing */
    border: none !important;
    border-bottom: none !important;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 0;
    transition: background 0.2s;
}

.dbc-searchbar-results .dbc-search-result-book:hover {
    background: #f5f5f5;
    box-shadow: none;
}

/* Book result in search results page (with card styling) */
.dbc-search-results-page .dbc-search-result-book {
    display: flex;
    padding: 20px 0; /* No horizontal padding - cover margins handle spacing */
    border: none !important;
    border-bottom: none !important;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0 0 20px 0;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

.dbc-search-results-page .dbc-search-results-group:last-child .dbc-search-result-book:last-child {
    margin-bottom: 0;
}

.dbc-search-results-page .dbc-search-result-book:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Book cover in dropdown - only right corners rounded to resemble a book */
.dbc-searchbar-results .dbc-search-book-cover {
    flex-shrink: 0;
    width: 112px; /* 30% larger (86px * 1.3 = 111.8px, rounded) */
    height: 169px; /* 30% larger (130px * 1.3 = 169px) */
    margin-left: 24px; /* Equal spacing on left */
    margin-right: 24px; /* Equal spacing on right */
    overflow: hidden;
    border-radius: 0 12px 12px 0; /* Increased radius on top-right and bottom-right */
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dbc-searchbar-results .dbc-search-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0 12px 12px 0; /* Increased radius on top-right and bottom-right */
}

/* Book cover in search results page - only right corners rounded to resemble a book */
.dbc-search-results-page .dbc-search-book-cover {
    flex-shrink: 0;
    width: 131px; /* 30% smaller than 187px */
    height: 197px; /* 30% smaller than 281px */
    margin-left: 32px; /* Equal spacing on left */
    margin-right: 32px; /* Equal spacing on right */
    overflow: hidden;
    border-radius: 0 12px 12px 0; /* Increased radius on top-right and bottom-right */
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dbc-search-results-page .dbc-search-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0 12px 12px 0; /* Increased radius on top-right and bottom-right */
}

.dbc-search-book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Allow text truncation */
    padding-right: 24px; /* Right padding for text content */
}

.dbc-search-results-page .dbc-search-book-info {
    padding-right: 32px; /* More right padding for results page */
}

.dbc-search-book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 20px;
}

.dbc-search-book-title-authors {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.dbc-search-book-rating {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px; /* Space between stars and rating number */
    font-size: 14px;
    line-height: 1;
}

.dbc-search-stars {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: calc(5 * var(--dbc-star-size) + 4 * var(--dbc-gap));
    height: var(--dbc-star-size);
    vertical-align: middle;
}

.dbc-search-stars-bg,
.dbc-search-stars-fill {
    position: absolute;
    inset: 0;
    display: flex;
    gap: var(--dbc-gap);
    align-items: center;
    pointer-events: none;
}

.dbc-search-stars-fill {
    overflow: hidden;
}

.dbc-search-star {
    width: var(--dbc-star-size);
    height: var(--dbc-star-size);
    flex: 0 0 var(--dbc-star-size);
}

.dbc-search-stars-bg .dbc-search-star path {
    fill: #999;
    stroke: #888;
    stroke-width: 0.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dbc-search-stars-fill .dbc-search-star path {
    fill: #f6c343;
    stroke: #e6b332;
    stroke-width: 0.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dbc-search-rating-number {
    color: #000;
    font-size: 13px;
    margin: 0;
    display: block;
    text-align: right;
    position: relative;
    top: 1px;
}

.dbc-search-book-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    font-family: "Noto Serif Vithkuqi", serif;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dbc-search-book-authors {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.dbc-search-book-description {
    margin: 0;
    width: 100%; /* Full width */
    font-size: 13px;
    color: #000;
    line-height: 1.5;
    text-align: left;
    /* No truncation - show full description as ACF handles max characters */
}

/* Person Result Item in dropdown (no card styling) */
.dbc-searchbar-results .dbc-search-result-person {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: none !important;
    border-bottom: none !important;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 0;
    transition: background 0.2s;
}

.dbc-searchbar-results .dbc-search-result-person:hover {
    background: #f5f5f5;
    box-shadow: none;
}

/* Person Result Item in search results page (with card styling) */
.dbc-search-results-page .dbc-search-result-person {
    display: flex;
    align-items: center;
    padding: 20px;
    border: none !important;
    border-bottom: none !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.dbc-search-results-page .dbc-search-result-person:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Author - Circular portrait in dropdown */
.dbc-searchbar-results .dbc-search-person-portrait-circle {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dbc-searchbar-results .dbc-search-person-portrait-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Celebrity - Square portrait in dropdown */
.dbc-searchbar-results .dbc-search-person-portrait-square {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dbc-searchbar-results .dbc-search-person-portrait-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 6px;
    /* Ensure images scale down smoothly, not up */
    min-width: 0;
    min-height: 0;
}

/* Author - Circular portrait in search results page */
.dbc-search-results-page .dbc-search-person-portrait-circle {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dbc-search-results-page .dbc-search-person-portrait-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* Celebrity - Square portrait in search results page */
.dbc-search-results-page .dbc-search-person-portrait-square {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-right: 20px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dbc-search-results-page .dbc-search-person-portrait-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;
}

/* Fallback for when class is not set */
.dbc-search-person-portrait {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dbc-search-person-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dbc-search-person-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dbc-search-person-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.dbc-search-person-type {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* See All Results Link */
.dbc-search-see-all {
    padding: 0;
    margin: 0;
    background: #14171c;
    border-top: 1px solid #1a252f;
}

.dbc-search-see-all-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    padding: 6px 16px;
    transition: background 0.2s;
    margin: 0;
}

@media (max-width: 768px) {
    .dbc-search-see-all-link {
        padding: 4px 12px;
        font-size: 12px;
    }
}

.dbc-search-see-all-link:hover {
    color: #fff;
    background: #000;
    text-decoration: underline;
}

/* Loading/Error States */
.dbc-search-loading,
.dbc-search-no-results,
.dbc-search-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dbc-search-loading {
    padding: 16px 12px;
    gap: 8px;
}

.dbc-search-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #f5c518;
    border-radius: 50%;
    animation: dbc-spin 0.8s linear infinite;
}

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

.dbc-search-error {
    color: #d63638;
}

/* Trending Searches */
.dbc-trending-group {
    background: transparent;
    margin: 0;
}

.dbc-trending-search-item {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease, color 0.15s ease;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.dbc-trending-search-item:last-child {
    border-bottom: none;
}

.dbc-trending-search-item:hover,
.dbc-trending-search-item.dbc-search-result-selected {
    background: #f5f5f5;
    color: #000;
}

.dbc-trending-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.dbc-trending-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.dbc-trending-icon svg {
    width: 100%;
    height: 100%;
}

.dbc-trending-term {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

/* Selected state for keyboard navigation */
.dbc-search-result-item.dbc-search-result-selected {
    background: #fff9e6 !important;
    outline: 2px solid #ffd46c;
    outline-offset: -2px;
}

.dbc-trending-search-item.dbc-search-result-selected {
    background: #fff9e6 !important;
    outline: 2px solid #ffd46c;
    outline-offset: -2px;
    color: #000 !important;
}


/* Search Results Page */
.dbc-search-results-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dbc-search-results-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: none;
}

.dbc-search-results-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.dbc-search-query {
    color: #ffd46c;
    font-weight: bold;
}

.dbc-search-results-count {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Search Results Page - Single Column Layout */
.dbc-search-results-page .dbc-search-results-list {
    max-width: 100%;
}

.dbc-search-results-page .dbc-search-results-group {
    margin-bottom: 32px;
    width: 100%;
}

.dbc-search-results-page .dbc-search-results-group:last-child {
    margin-bottom: 0;
}

.dbc-search-results-page .dbc-search-results-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding: 8px 0 12px 0;
    background: transparent;
    border-bottom: 2px solid #ddd;
    margin: 0 0 16px 0;
}

.dbc-search-results-page .dbc-search-result-item {
    margin-bottom: 0;
    display: block;
}

/* This is now handled by the specific selectors above */

/* Sizing is now handled in the specific selectors above */

.dbc-search-results-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dbc-search-results-empty p {
    margin: 10px 0;
    font-size: 16px;
}

/* Pagination */
.dbc-search-results-page .page-numbers {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.dbc-search-results-page .page-numbers a,
.dbc-search-results-page .page-numbers span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.dbc-search-results-page .page-numbers a:hover {
    background: #ffd46c;
    color: #fff;
    border-color: #ffd46c;
}

.dbc-search-results-page .page-numbers .current {
    background: #ffd46c;
    color: #fff;
    border-color: #ffd46c;
}

/* Responsive */
@media (max-width: 768px) {
    .dbc-searchbar-wrapper {
        max-width: 100%;
    }
    
    .dbc-search-result-book {
        padding: 12px;
    }
    
    .dbc-search-book-cover {
        width: 60px;
        height: 90px;
        margin-right: 12px;
    }
    
    .dbc-search-person-portrait-circle,
    .dbc-search-person-portrait-square,
    .dbc-search-person-portrait {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    
    .dbc-search-book-title {
        font-size: 16px;
    }
    
    .dbc-search-results-title {
        font-size: 22px;
    }
    
    .dbc-search-results-page .dbc-search-results-subtitle {
        font-size: 16px;
    }
    
    .dbc-search-results-page .dbc-search-result-book,
    .dbc-search-results-page .dbc-search-result-person {
        padding: 16px;
    }
}

/* Pre-search compact layout (tablet + mobile only) */
@media (max-width: 1024px) {
    .dbc-searchbar-results .dbc-search-book-cover {
        width: 67px;
        height: 101px;
        margin-left: 16px;
        margin-right: 16px;
    }

    .dbc-searchbar-results .dbc-search-result-book {
        padding: 12px 0;
    }

    .dbc-searchbar-results .dbc-search-book-info {
        padding-right: 16px;
    }

    .dbc-searchbar-results .dbc-search-book-header {
        margin-bottom: 0;
        gap: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .dbc-searchbar-results .dbc-search-book-title {
        margin: 0;
        font-size: 16px;
    }

    .dbc-searchbar-results .dbc-search-book-description {
        display: none;
    }

    .dbc-searchbar-results .dbc-search-book-rating {
        gap: 6px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .dbc-searchbar-results .dbc-search-rating-number {
        display: inline-block;
        margin: 0;
    }

    .dbc-searchbar-results .dbc-search-stars {
        --dbc-star-size: 16px !important;
        --dbc-gap: 2px !important;
    }
}

@media (max-width: 768px) {
    .dbc-searchbar-results .dbc-search-book-cover {
        width: 67px;
        height: 101px;
        margin-left: 16px;
        margin-right: 16px;
    }

    .dbc-searchbar-results .dbc-search-book-title {
        font-size: 15px;
    }
}
