/* Search Input Component Styles */

/* Search Input Wrapper - Main container with gradient background and animations */
.search-input-wrapper {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 42, 58, 0.9), rgba(45, 55, 72, 0.8));
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: var(--border-radius);
    padding: 1rem;
    backdrop-filter: blur(15px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Animated border effect */
.search-input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius);
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-steel), var(--accent-blue));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.search-input-wrapper:hover::before {
    opacity: 0.6;
}

.search-input-wrapper:focus-within {
    box-shadow: 
        0 0 0 3px rgba(255, 107, 53, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.search-input-wrapper:focus-within::before {
    opacity: 1;
    animation: border-glow 2s ease-in-out infinite alternate;
}

@keyframes border-glow {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Search Input Textarea */
.search-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    resize: none;
    font-family: inherit;
    min-height: 24px;
    max-height: 120px;
    line-height: 1.8;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

/* Search Actions Container */
.search-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

/* When attach button is present, use space-between layout */
.search-actions:has(.attach-button) {
    justify-content: space-between;
}

/* Attach Button */
.attach-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(112, 128, 144, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(112, 128, 144, 0.3);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.attach-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.attach-button:hover::before {
    left: 100%;
}

.attach-button:hover {
    background: linear-gradient(135deg, rgba(112, 128, 144, 0.2), rgba(59, 130, 246, 0.1));
    border-color: rgba(112, 128, 144, 0.5);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(112, 128, 144, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.attach-button:active {
    transform: translateY(0px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.attach-button i {
    font-size: 1rem;
    color: var(--accent-steel);
    transition: var(--transition);
}

.attach-button:hover i {
    color: var(--accent-blue);
    transform: rotate(-15deg) scale(1.1);
}

.attach-button span {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Search Button */
.search-button {
    background: var(--fire-gradient);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: var(--fire-gradient);
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.search-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.search-button:hover::before {
    opacity: 0.8;
    animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.4; }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .search-input-wrapper {
        padding: 1rem 0.75rem;
    }
    
    .search-input {
        font-size: 0.875rem;
    }
    
    .search-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .attach-button {
        justify-content: center;
    }
    
    .search-button {
        align-self: flex-end;
    }
    
    .attach-button span {
        display: none;
    }
}