/* ==========================================================================
   SÖKFUNKTION - GEMENSAM STYLING
   ========================================================================== */

/* Header sökning - container */
.header-actions .search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-actions .search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: color 0.3s;
    z-index: 2;
}

.header-actions .search-icon:hover {
    color: #000000;
}

/* Header sökning - animerad form */
.header-actions .search-form {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    width: 0;
    height: 40px;
    opacity: 0;
    overflow: hidden;
    transition: width 0.4s ease, opacity 0.3s ease;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 5px;
    padding: 0;
}

.header-actions .search-container:hover .search-form,
.header-actions .search-form:focus-within {
    width: 320px;
    height: 40px;
    opacity: 1;
    padding: 5px 25px 5px 5px;
}

/* Söksida - statisk form */
.search-form-container .search-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-form-wrapper {
    display: flex;
    position: relative;
    align-items: center;
}

/* Gemensam styling för sökfält */
.search-field {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    outline: none;
    background: #fff;
    color: #333;
}

.search-field:focus {
    border-color: #c41e3a;
}

.search-field::placeholder {
    color: #999;
}

/* Header sökning - transparent fält */
.header-actions .search-field {
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    background: transparent;
}

/* Gemensam styling för sök-knapp */
.search-submit {
    position: absolute;
    right: 5px;
    background: transparent;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

/* Header sökning - enklare knapp */
.header-actions .search-submit {
    background: none;
    color: #666;
    width: auto;
    height: auto;
    padding: 6px;
    border-radius: 0;
}

.header-actions .search-submit:hover {
    background: none;
    color: #c41e3a;
}

/* Screen reader text */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Mobil anpassning */
@media (max-width: 1024px) {
    .header-actions .search-container:hover .search-form,
    .header-actions .search-form:focus-within {
        width: 220px;
    }

    .search-form {
        margin-top: 10px;
    }
}



@media (max-width: 480px) {
    .header-actions .search-container {
        display: none;
    }

    .search-form-container .search-form {
        max-width: 100%;
    }
}