/* Company list */
.excellentindex-list {
    margin: 0 auto;
}

.excellentindex-item-wrapper {
    margin: 20px 0 0 0;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    overflow: hidden;
    container-type: inline-size;
    position: relative;
}

.excellentindex-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

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

.excellentindex-number-column {
    flex: 0 0 48px;
    margin-left: 20px;
}

.excellentindex-item .excellentindex-company{
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.excellentindex-ratings {
    margin-top: 20px;
}

.excellentindex-item .excellentindex-logo {
    flex: 0 0 150px;
    max-width: 150px;
    max-height: 150px;
}

.excellentindex-item .excellentindex-logo img,
.excellentindex-item .excellentindex-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
}

.excellentindex-item .excellentindex-infos{
    padding: 0 10px 0 0;
    flex: 1 1 280px;
    min-width: 280px;
}

.excellentindex-item h3 {
    margin: 0 0 10px 0;
}

.excellentindex-ratings{
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.excellentindex-ratings-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}




.rating-stars {
    display: inline-flex;
    align-items: center;
}

.rating-star {
    margin-right: 5px;
}

.rating-star:last-child {
    margin-right: 0;
}

/* Category search */
.excellentindex-search {
    position: relative;
}

.excellentindex-search form {
    display: flex;
    gap: 10px;
}


.excellentindex-search input[type="text"] {
    flex: 1 0 100%;
    max-width: 100%;
    width: 100%;
    height: 50px;
    padding: 8px 12px;
    background: #eaeaea;
    color: #111111;
    font: 1em "HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif;
    box-sizing: border-box;
    border: none;
    outline: none;
}

/* Placeholder should remain grey while typed text is black */
.excellentindex-search input[type="text"]::placeholder {
    color: #9ca3af;
}

#ei-category-search {
    margin: 0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    margin-right: 8px !important;
}

/* Apply same styling for the list page search input */
#ei-search-input {
    margin: 0 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    margin-right: 8px !important;
}

.excellentindex-search input[type="text"].invalid {
    border-color: #dc3545;
}

.excellentindex-search button {
    padding: 12px 24px;
    background-color: #4d4d4d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    height: 50px;
    min-width: 100px;
    max-width: 150px;
    box-sizing: border-box;
    line-height: 1.2;
}

.excellentindex-search button:hover {
    background-color: #3a3a3a;
}

/* Override any theme button styles */
.excellentindex-search button,
.excellentindex-search button:focus,
.excellentindex-search button:active {
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-family: inherit !important;
    margin: 0 !important;
    vertical-align: baseline !important;
}

.suggestion-header {
    padding: 12px 14px;
    font-weight: 600;
    font-size: 13px;
    color: #6b7280;
    background-color: #f9fafb;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item {
    position: relative;
    display: block;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background-color .15s ease;
}

.suggestion-item:hover {
    background-color: #f8fafc;
}

.suggestion-item.selected {
    background-color: #eef2ff;
}

.suggestion-content{
    margin: 0 0 0 46px;
}

.suggestion-content::before{
    position: absolute;
    left: 12px;
    top:10px;
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d9d9e1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='white' d='M64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l80 0 0-64c0-26.5 21.5-48 48-48s48 21.5 48 48l0 64 80 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16L64 48zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm88 40c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48zM232 88l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16zM88 232c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48zm144-16l48 0c8.8 0 16 7.2 16 16l0 48c0 8.8-7.2 16-16 16l-48 0c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    vertical-align: middle;
  }
  

.suggestion-item.category,
.suggestion-item .suggestion-name{
    font-weight: bold;
    color: #f35921;
}
.suggestion-item .suggestion-subcategory{
    font-style: italic;
    min-height: 20px;
}

.suggestion-item.category{
    display: flex;
    align-items: center;
    padding: 0 0 0 58px;
    min-height: 40px;
}

.suggestion-item.category::before{
    position: absolute;
    left: 12px;
    top: 4px;
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d9d9e1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='white' d='M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    vertical-align: middle;
}


.configurable-link a{
    display: block;
    text-decoration: none;
    text-align: center;
    color: #f35921;
    font-weight: bold;
    font-size: 12px;
}

.invalid-input{
    border: 2px solid red !important;
}

/* Nummerierung im Kreis */
.excellentindex-number-circle {
    width: 48px;
    height: 48px;
    background-color: #198e38;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.c2a2 {
    background-color: #4d4d4d;
    padding: 10px 20px 10px 20px;
    border-radius: 3px;
    color: #fff !important;
    text-align: center;
    font-weight: normal;
    font-size: 1.1em;
    text-decoration: none;
    display: inline-block;
}

.c2a2:hover {
    background-color: #f35921;
}


/* Vorschlagscontainer */
#ei-search-suggestions {
    position: absolute;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    display: none;
    top: 100%;
    left: 0;
    margin-top: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.06);
    max-height: 360px;
    z-index: 99999;
}
  

/* Kategorieüberschriften */
.suggestions-heading {
    padding: 8px 15px;
    font-weight: bold;
    background-color: #f2f2fb;
}

.search-container {
    display: flex;
    position: relative;
    flex: 1;
}

/* Loading Spinner im Suchfeld */
.search-loading-spinner {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: none;
    z-index: 10;
}

.search-loading-spinner img {
    width: 100%;
    height: 100%;
}



.excellentindex-footer {
    margin-top: 10px;
    padding: 8px 10px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.excellentindex-search-results-link {
    display: block;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
}

/* Company Search Form */
.excellentindex-company-search {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.company-search-form {
    margin: 0;
}

.search-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.search-input-group input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input-group input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.search-btn {
    padding: 12px 24px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #005a87;
}

.search-reset {
    text-align: right;
}

.reset-search {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.reset-search:hover {
    color: #dc3545;
    background-color: #f8f9fa;
    text-decoration: none;
}

/* Pagination Styles */
.excellentindex-pagination {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.pagination-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination-link:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
    text-decoration: none;
}

.pagination-link.current {
    background-color: #0073aa;
    border-color: #0073aa;
    color: white;
}

.pagination-link.prev,
.pagination-link.next {
    font-weight: 500;
}

.pagination-dots {
    padding: 8px 4px;
    color: #6c757d;
    font-size: 14px;
}

/* Load More Button */
.excellentindex-load-more {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

.load-more-btn {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #218838;
}

.load-more-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Loading Indicator */
.excellentindex-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading-spinner {
    margin-bottom: 10px;
}

.loading-spinner img {
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Error Messages */
.excellentindex-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .excellentindex-search form {
        flex-direction: column;
        gap: 10px;
    }
    
    .excellentindex-search input[type="text"] {
        height: 45px;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .excellentindex-search button {
        height: 45px;
        font-size: 14px;
        padding: 10px 20px;
        min-width: 80px;
        max-width: 120px;
        align-self: flex-start;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-group input[type="text"] {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .search-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .pagination-links {
        gap: 3px;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
    
    .load-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
