/**
 * Oneirokritis Glossary - Public Styles
 */

/* ==========================================================================
   Search Component
   ========================================================================== */

.oneirokritis-search-wrapper {
    position: relative;
    margin: 2rem 0;
}

.oneirokritis-search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.oneirokritis-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.oneirokritis-search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.oneirokritis-search-button {
    padding: 1rem 1.5rem;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.oneirokritis-search-button:hover {
    background: #357abd;
}

.oneirokritis-search-button svg {
    display: block;
}

/* Modern Search Style */
.oneirokritis-search-wrapper[data-style="modern"] .oneirokritis-search-input {
    border-radius: 12px;
    background: #f8f9fa;
    border-color: transparent;
}

.oneirokritis-search-wrapper[data-style="modern"] .oneirokritis-search-button {
    border-radius: 12px;
}

/* Search Results */
.oneirokritis-search-results {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.oneirokritis-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.results-count {
    font-size: 0.875rem;
    color: #666;
}

.close-results {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.close-results:hover {
    color: #333;
}

.oneirokritis-results-list {
    padding: 0.5rem;
}

.search-result-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

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

.result-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 1.5rem;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-content h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.result-content h4 a {
    color: #333;
    text-decoration: none;
}

.result-content h4 a:hover {
    color: #4a90e2;
}

.result-content p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.result-content p strong {
    background: #fff3cd;
    padding: 0 2px;
}

.result-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e7f3ff;
    color: #4a90e2;
    font-size: 0.75rem;
    border-radius: 20px;
}

.no-results,
.search-error {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Loading Spinner */
.oneirokritis-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    color: #666;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Alphabetical Index
   ========================================================================== */

.oneirokritis-index-wrapper {
    margin: 2rem 0;
}

.oneirokritis-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.letter-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
	flex-wrap: wrap!important;
}

.letter-link.has-entries {
    background: white;
    color: #4a90e2;
    border: 2px solid #e0e0e0;
}

.letter-link.has-entries:hover,
.letter-link.active {
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.letter-link.no-entries {
    color: #ccc;
    cursor: not-allowed;
}

.letter-count {
    font-size: 0.65rem;
    color: #999;
    font-weight: normal;
}

.oneirokritis-entries {
    margin-top: 2rem;
}

.letter-section {
    display: block;
    margin-bottom: 2rem;
}

.letter-heading {
    font-size: 2rem;
    color: #4a90e2;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #e0e0e0;
}

.dreams-list-horizontal {
    line-height: 2.5;
    font-size: 1rem;
}

.dreams-list-horizontal a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 0 0.75rem;
    min-width: 200px!important;
    text-align: left;
}

.dreams-list-horizontal a:hover {
    color: #4a90e2;
}

/* ==========================================================================
   Dream List
   ========================================================================== */

.oneirokritis-dream-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.oneirokritis-dream-list[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.oneirokritis-dream-list[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.dream-list-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dream-list-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.dream-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.dream-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dream-list-item:hover .dream-thumbnail img {
    transform: scale(1.05);
}

.dream-content {
    padding: 1.5rem;
}

.dream-title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.dream-title a {
    color: #333;
    text-decoration: none;
}

.dream-title a:hover {
    color: #4a90e2;
}

.dream-excerpt {
    margin: 0 0 1rem;
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.dream-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dream-categories a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e7f3ff;
    color: #4a90e2;
    font-size: 0.8125rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dream-categories a:hover {
    background: #4a90e2;
    color: white;
}

/* ==========================================================================
   Categories Grid
   ========================================================================== */

.oneirokritis-categories {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.oneirokritis-categories[data-style="grid"] {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.category-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.category-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.category-name {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.category-name a {
    color: #333;
    text-decoration: none;
}

.category-name a:hover {
    color: #4a90e2;
}

.category-count {
    color: #999;
    font-size: 0.875rem;
    font-weight: normal;
}

.category-description {
    margin: 0;
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .oneirokritis-search-form {
        max-width: 100%;
    }
    
    .oneirokritis-alphabet-nav {
        gap: 0.25rem;
        padding: 1rem;
    }
    
    .letter-link {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .oneirokritis-entries {
        column-count: 1;
    }
    
    .oneirokritis-dream-list[data-columns="2"],
    .oneirokritis-dream-list[data-columns="3"] {
        grid-template-columns: 1fr;
    }
    
    .oneirokritis-categories[data-style="grid"] {
        grid-template-columns: 1fr;
    }
}

/* test */