242 lines
4.5 KiB
SCSS
242 lines
4.5 KiB
SCSS
.book-searcher-container {
|
|
margin-left: 0.5rem;
|
|
position: relative;
|
|
width: 100%;
|
|
min-width: 0;
|
|
|
|
@media (width >= 768px) {
|
|
margin-left: 1.25rem;
|
|
width: var(--app-search-width-desktop);
|
|
max-width: 100%;
|
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
}
|
|
|
|
// Popover styles moved to global src/styles.scss due to appendTo="body"
|
|
|
|
.search-iconfield {
|
|
width: 100%;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
border-radius: 8px;
|
|
|
|
@media (width >= 640px) {
|
|
display: flex;
|
|
}
|
|
|
|
&.focused {
|
|
background: color-mix(in srgb, var(--primary-color) 5%, transparent);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 20%, transparent);
|
|
|
|
.search-input {
|
|
border-color: var(--primary-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
padding-right: 2.5rem;
|
|
height: 2.5rem;
|
|
line-height: 2.5rem;
|
|
font-size: 1rem;
|
|
background: var(--surface-800) !important;
|
|
border: 1px solid var(--surface-600);
|
|
transition: all 0.2s ease;
|
|
|
|
&:hover {
|
|
border-color: var(--surface-500);
|
|
background: var(--surface-700) !important;
|
|
}
|
|
}
|
|
|
|
.clear-search-btn {
|
|
position: absolute;
|
|
right: 0.5rem;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
display: none;
|
|
|
|
@media (width >= 640px) {
|
|
display: inline-flex;
|
|
}
|
|
}
|
|
|
|
.search-dropdown {
|
|
width: 100%;
|
|
background: transparent; // Glassmorphism handled by parent .search-results-popover
|
|
border: none;
|
|
border-radius: 8px;
|
|
max-height: min(70vh, calc(100dvh - 4rem));
|
|
overflow-y: auto;
|
|
|
|
// Desktop width constraints moved to src/styles.scss for body-appended elements
|
|
}
|
|
|
|
// .show class no longer needed as popover handles visibility
|
|
|
|
.search-dropdown-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s ease;
|
|
border-bottom: 1px solid color-mix(in srgb, var(--border-color) 50%, transparent);
|
|
|
|
&:first-child {
|
|
border-radius: 8px 8px 0 0;
|
|
}
|
|
|
|
&:last-child {
|
|
border-radius: 0 0 8px 8px;
|
|
border-bottom: none;
|
|
}
|
|
|
|
&:hover,
|
|
&.active {
|
|
background-color: var(--surface-hover);
|
|
}
|
|
|
|
&.no-results {
|
|
padding: 2rem 1rem;
|
|
text-align: center;
|
|
color: var(--text-secondary-color);
|
|
font-style: italic;
|
|
}
|
|
}
|
|
|
|
.search-item-content {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: flex-start;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.search-book-cover {
|
|
width: 50px;
|
|
height: 67px;
|
|
min-width: 50px;
|
|
object-fit: cover;
|
|
border-radius: 4px;
|
|
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
|
|
background-color: var(--ground-background);
|
|
aspect-ratio: 2/3;
|
|
}
|
|
|
|
.search-book-details {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.search-book-title-container {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.search-book-name {
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
line-height: 1.4;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
overflow-wrap: anywhere;
|
|
margin: 0;
|
|
}
|
|
|
|
.search-book-meta-line {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.search-book-authors {
|
|
font-size: 0.9rem;
|
|
font-style: italic;
|
|
color: var(--text-secondary-color);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
margin: 0;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.search-book-year {
|
|
font-size: 0.8rem;
|
|
color: var(--text-secondary-color);
|
|
background-color: var(--ground-background);
|
|
padding: 0.125rem 0.5rem;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.search-book-series {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.375rem;
|
|
font-size: 0.8rem;
|
|
color: var(--primary-color);
|
|
padding: 0.075rem 0.125rem;
|
|
border-radius: 4px;
|
|
width: fit-content;
|
|
|
|
i {
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
span {
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
.search-book-metadata {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.metadata-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
font-size: 0.8rem;
|
|
padding: 0.1rem 0.25rem;
|
|
border-radius: 4px;
|
|
background-color: var(--surface-hover);
|
|
color: var(--text-secondary-color);
|
|
white-space: nowrap;
|
|
|
|
i {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
&.series-badge {
|
|
background-color: color-mix(in srgb, var(--p-primary-color) 10%, transparent);
|
|
color: var(--p-primary-color);
|
|
}
|
|
}
|
|
|
|
.search-skeleton-item {
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: 1rem;
|
|
padding: 0.75rem 1rem;
|
|
}
|
|
|
|
.search-skeleton-details {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
flex: 1;
|
|
}
|