.kda-search-box {
    position: relative;
    width: 100%;
}

.kda-search-input-wrapper {
    position: relative;
    display: flex;
}

.kda-search-input-container {
    position: relative;
    flex: 1;
}

.kda-search-input {
    width: 100%;
    padding: 10px 55px 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.kda-search-input:focus {
    outline: none;
    border-color: #79b9e6;
}

.kda-search-clear {
    position: absolute;
    right: 50px;
    top: 0;
    bottom: 0;
    width: 40px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, opacity 0.3s;
    opacity: 0.7;
    z-index: 2;
}

.kda-search-clear:hover {
    color: #333;
    opacity: 1;
}

.kda-search-submit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.3s;
    border-radius: 50%;
    overflow: hidden;
    transform-origin: center center;
    will-change: transform;
    z-index: 2;
}

.kda-search-submit svg {
    transition: all 0.2s ease;
    transform-origin: center;
}

.kda-search-submit:hover {
    color: #e27d99;
}

/* ========== АНИМАЦИИ ПОИСКОВОЙ СТРОКИ ========== */

/* 1. Плавная смена цвета */
.search-animation-color .kda-search-input {
    animation: gentleColorShift 4s ease-in-out infinite;
}

.search-animation-color .kda-search-submit svg {
    animation: iconGentlePulse 2.5s ease-in-out infinite;
}

@keyframes gentleColorShift {
    0% { background-color: #ffffff; border-color: #e0e0e0; }
    50% { background-color: #f3f4f6; border-color: #79b9e6; }
    100% { background-color: #ffffff; border-color: #e0e0e0; }
}

@keyframes iconGentlePulse {
    0%, 100% { stroke: #666; opacity: 0.7; transform: scale(1); }
    50% { stroke: #79b9e6; opacity: 1; transform: scale(1.04); }
}

/* 2. Пульсация (тень) */
.search-animation-pulse .kda-search-input {
    animation: gentlePulse 2.2s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.search-animation-pulse .kda-search-submit svg {
    animation: iconWiggle 2.2s ease-in-out infinite;
}

@keyframes gentlePulse {
    0% { box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 0 0 0 rgba(121,185,230,0); }
    50% { box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 0 0 4px rgba(121,185,230,0.35); }
    100% { box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 0 0 0 rgba(121,185,230,0); }
}

@keyframes iconWiggle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20% { transform: scale(1.05) rotate(3deg); }
    40% { transform: scale(1) rotate(-2deg); }
    60% { transform: scale(1.03) rotate(1deg); }
}

/* 3. Градиентное смещение */
.search-animation-gradient .kda-search-input {
    background: linear-gradient(105deg, #ffffff 0%, #f0f9ff 30%, #e6f3e8 70%, #ffffff 100%);
    background-size: 250% 100%;
    animation: strongGradientShift 3.5s ease infinite;
    /*border: 2px solid transparent;*/
    background-clip: padding-box;
}

.search-animation-gradient .kda-search-submit svg {
    animation: iconGentleGlow 2.5s ease-in-out infinite;
}

@keyframes strongGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes iconGentleGlow {
    0% { stroke: #999; opacity: 0.6; filter: drop-shadow(0 0 0 rgba(121,185,230,0)); transform: scale(1); }
    50% { stroke: #79b9e6; opacity: 1; filter: drop-shadow(0 0 4px rgba(121,185,230,0.5)); transform: scale(1.04); }
    100% { stroke: #999; opacity: 0.6; filter: drop-shadow(0 0 0 rgba(121,185,230,0)); transform: scale(1); }
}

/* Остановка анимации при взаимодействии */
.kda-search-box.animation-stopped .kda-search-input,
.kda-search-box.animation-stopped .kda-search-submit svg {
    animation: none !important;
}

/* Стили для анимации печати */
.kda-search-input.typing {
    caret-color: transparent;
}

/* Подсказки (suggest) */
.kda-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kda-search-suggestions-visible {
    opacity: 1;
    visibility: visible;
    animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kda-search-suggestion-item {
    border-bottom: 1px solid #f0f0f0;
}

.kda-search-suggestion-item:last-child {
    border-bottom: none;
}

.kda-search-suggestion-link {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
}

.kda-search-suggestion-link:hover {
    background-color: #f8f8f8;
}

.kda-search-suggestion-text {
    display: block;
    font-weight: 500;
}

.kda-search-suggestion-category {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.kda-search-highlight {
    background-color: #fff9c4;
    font-weight: bold;
    padding: 0 1px;
    border-radius: 2px;
}

.kda-search-suggestion-all {
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
}

.kda-search-suggestion-all-link {
    display: block;
    padding: 10px 15px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
}