/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Zentriert die Suchleiste im Navigation-Hook */
.custom-search-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

/* Optional: Fügt etwas Abstand oben/unten hinzu */
.custom-search-wrapper {
    padding: 15px 0;
}

/* Search Container */
.custom-search-wrapper {
    width: 100%;
    max-width: 800px;

    margin: 0 auto;
}

.search-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 8px 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    gap: 15px;
    position: relative;
	height: 40px; /* Feste Höhe */
    max-height: 40px;
}

/* Search Container - MIT BORDER */
.custom-search-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 0 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    gap: 15px;
    position: relative;
    height: 40px;
    max-height: 40px;
    border: 2px solid #e0e0e0; /* Border für den gesamten Container */
    transition: border-color 0.3s ease;
}

/* Border Farbe beim Focus */
.search-container:focus-within {
    border-color: #999; /* Ändere diese Farbe nach deinen Wünschen */
}

/* Oder für einen stärkeren Effekt: */
.search-container:hover {
    border-color: #ccc;
}

/* Category Dropdown */
.category-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.category-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-family: inherit;
    outline: none;
    height: 100%;
}

.category-dropdown-btn:hover,
.category-dropdown-btn:focus,
.category-dropdown-btn:active,
.category-dropdown-btn:focus-visible {
    color: #000;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    width: 10px;
    height: 8px;
}

.category-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.category-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.category-dropdown.active .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #333;
}

.category-option:hover {
    background: #f5f5f5;
}

.category-option:first-child {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

.category-option.selected {
    background: #f0f0f0;
    color: #000;
    font-weight: 500;
}

/* Divider */
.search-divider {
    width: 1px;
    height: 24px;
    background: #e0e0e0;
    flex-shrink: 0;
}

/* Search Input - KEIN BORDER */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    height: 100%;
}

.search-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
	color: #191919;
}

.search-field {
    border: none !important; /* Entfernt alle Borders */
    background: transparent;
    font-size: 14px;
    width: 100%;
    outline: none !important; /* Entfernt den Focus-Outline */
    padding: 0;
    font-family: inherit;
    height: 100%;
    line-height: 40px;
    box-shadow: none !important; /* Entfernt Box-Shadow */
}

.search-field:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.search-field::placeholder {
    color: #999;
}

/* Entfernt Browser-Standard-Styles für Search-Input */
.search-field::-webkit-search-decoration,
.search-field::-webkit-search-cancel-button,
.search-field::-webkit-search-results-button,
.search-field::-webkit-search-results-decoration {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        padding: 0 15px;
        gap: 10px;
        height: 40px;
    }
    
    .category-dropdown-btn {
        padding: 0 8px;
        font-size: 13px;
    }
    
    .search-field {
        font-size: 13px;
    }
    
    .category-dropdown-menu {
        min-width: 180px;
    }
    
    .category-option {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .search-divider {
        height: 20px;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        padding: 10px 15px;
        gap: 8px;
        border-radius: 20px;
        height: auto;
        max-height: none;
    }
    
    .search-divider {
        width: 100%;
        height: 1px;
    }
    
    .category-dropdown,
    .search-input-wrapper {
        width: 100%;
    }
}

/* Category Dropdown */
.category-dropdown {
    position: relative;
}

.category-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-family: inherit;
}

.category-dropdown-btn:hover {
    color: #000;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.category-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.category-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.category-dropdown.active .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 15px;
    color: #333;
}

.category-option:hover {
    background: #f5f5f5;
}

.category-option:first-child {
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

.category-option.selected {
    background: #f0f0f0;
    color: #000;
    font-weight: 500;
}

/* Divider */
.search-divider {
    width: 1px;
    height: 30px;
    background: #e0e0e0;
    flex-shrink: 0;
}

/* Search Input */
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.search-icon {
    flex-shrink: 0;
}

.search-field {
    border: none;
    background: transparent;
    font-size: 15px;
    width: 100%;
    outline: none;
    padding: 8px 0;
    font-family: inherit;
}

.search-field::placeholder {
    color: #999;
}

.category-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-family: inherit;
    outline: none; /* Entfernt den Outline beim Klick */
}

.category-dropdown-btn:hover {
    color: #000;
    background: none; /* Explizit kein Hintergrund */
}

.category-dropdown-btn:focus {
    background: none; /* Kein Hintergrund beim Focus */
    outline: none; /* Kein Outline */
}

.category-dropdown-btn:active {
    background: none; /* Kein Hintergrund beim Klick */
}

/* Falls der Button trotzdem einen Hintergrund bekommt, füge dies hinzu: */
.category-dropdown-btn:focus-visible {
    background: none;
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        padding: 6px 15px;
        gap: 10px;
    }
    
    .category-dropdown-btn {
        padding: 6px 8px;
    }
    
    .category-text {
        font-size: 14px;
    }
    
    .search-field {
        font-size: 14px;
    }
    
    .category-dropdown-menu {
        min-width: 180px;
    }
    
    .category-option {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        padding: 10px 15px;
        gap: 8px;
        border-radius: 20px;
    }
    
    .search-divider {
        width: 100%;
        height: 1px;
    }
    
    .category-dropdown,
    .search-input-wrapper {
        width: 100%;
    }
}