/* SpeedShot Media Hub Search - Styles */

/* Wrapper */
.speedshot-search-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Form */
.speedshot-search-form {
    width: 100%;
}

/* Input Wrapper */
.speedshot-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.speedshot-search-input-wrapper:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.speedshot-search-input-wrapper:focus-within {
    border-color: #84cc16;
    box-shadow: 0 4px 16px rgba(132, 204, 22, 0.25);
}

/* Search Icon */
.speedshot-search-icon {
    position: absolute;
    left: 20px;
    color: #6b7280;
    pointer-events: none;
    transition: color 0.3s ease;
}

.speedshot-search-input-wrapper:focus-within .speedshot-search-icon {
    color: #84cc16;
}

/* Input Field */
.speedshot-search-input {
    flex: 1;
    padding: 16px 20px 16px 50px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #000000;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.speedshot-search-input::placeholder {
    color: #6b7280;
}

/* Button */
.speedshot-search-button {
    padding: 12px 28px;
    margin: 4px;
    background: #84cc16;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.speedshot-search-button:hover {
    background: #65a30d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.4);
}

.speedshot-search-button:active {
    transform: translateY(0);
}

/* ============================================
   STYLE: HEADER
   Dezent, modern, für schwarzen Header
   ============================================ */
.speedshot-search-header {
    max-width: 100%;
    width: 100%;
}

.speedshot-search-header .speedshot-search-input-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    padding: 0;
    transition: all 0.3s ease;
}

.speedshot-search-header .speedshot-search-input {
    padding: 10px 14px;
    font-size: 14px;
    flex: 1;
    color: #ffffff;
    background: transparent;
}

.speedshot-search-header .speedshot-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.speedshot-search-header .speedshot-search-button {
    padding: 10px 14px;
    margin: 0;
    font-size: 16px;
    border-radius: 0 6px 6px 0;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.3s ease;
}

.speedshot-search-header .speedshot-search-button svg {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.speedshot-search-header .speedshot-search-input-wrapper:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.speedshot-search-header .speedshot-search-input-wrapper:hover .speedshot-search-button svg {
    color: rgba(255, 255, 255, 0.9);
}

.speedshot-search-header .speedshot-search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.speedshot-search-header .speedshot-search-input-wrapper:focus-within .speedshot-search-button svg {
    color: #ffffff;
}

.speedshot-search-header .speedshot-search-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile für Header Style */
@media (max-width: 768px) {
    .speedshot-search-header {
        max-width: 100%;
    }
    
    .speedshot-search-header .speedshot-search-input {
        font-size: 16px; /* Verhindert iOS Zoom */
    }
}

/* ============================================
   STYLE: SMALL HORIZONTAL
   Kompakte horizontale Variante für Header/Navbar
   ============================================ */
.speedshot-search-small-horizontal {
    max-width: 100%;
}

.speedshot-search-small-horizontal .speedshot-search-input-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: none;
    padding: 0;
    background: #ffffff;
}

.speedshot-search-small-horizontal .speedshot-search-input {
    padding: 8px 12px;
    font-size: 14px;
    flex: 1;
    color: #000000;
    background: #ffffff;
}

.speedshot-search-small-horizontal .speedshot-search-input::placeholder {
    color: #6b7280;
}

.speedshot-search-small-horizontal .speedshot-search-button {
    padding: 8px 12px;
    margin: 2px;
    font-size: 16px;
    border-radius: 4px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #84cc16;
}

.speedshot-search-small-horizontal .speedshot-search-button:hover {
    background: #65a30d;
}

.speedshot-search-small-horizontal .speedshot-search-input-wrapper:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.speedshot-search-small-horizontal .speedshot-search-input-wrapper:focus-within {
    border-color: #84cc16;
    box-shadow: 0 2px 8px rgba(132, 204, 22, 0.15);
}

/* Mobile für Small Horizontal */
@media (max-width: 480px) {
    .speedshot-search-small-horizontal {
        max-width: 100%;
    }
    
    .speedshot-search-small-horizontal .speedshot-search-input {
        font-size: 16px; /* Verhindert iOS Zoom */
    }
}

/* ============================================
   STYLE: MINIMAL
   ============================================ */
.speedshot-search-minimal .speedshot-search-input-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: none;
    background: #ffffff;
}

.speedshot-search-minimal .speedshot-search-input {
    padding: 12px 16px 12px 45px;
    font-size: 15px;
    color: #000000;
    background: #ffffff;
}

.speedshot-search-minimal .speedshot-search-icon {
    left: 16px;
    color: #6b7280;
}

.speedshot-search-minimal .speedshot-search-input-wrapper:focus-within .speedshot-search-icon {
    color: #84cc16;
}

.speedshot-search-minimal .speedshot-search-button {
    padding: 10px 24px;
    font-size: 14px;
    border-radius: 6px;
    background: #84cc16;
}

.speedshot-search-minimal .speedshot-search-button:hover {
    background: #65a30d;
}

.speedshot-search-minimal .speedshot-search-input-wrapper:hover {
    border-color: #9ca3af;
}

.speedshot-search-minimal .speedshot-search-input-wrapper:focus-within {
    border-color: #84cc16;
    box-shadow: 0 2px 8px rgba(132, 204, 22, 0.15);
}

/* ============================================
   STYLE: MODERN
   ============================================ */
.speedshot-search-modern .speedshot-search-input-wrapper {
    border: 2px solid #000000;
    border-radius: 12px;
    background: #ffffff;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.speedshot-search-modern .speedshot-search-icon {
    color: #000000;
}

.speedshot-search-modern .speedshot-search-input {
    color: #000000;
    background: #ffffff;
}

.speedshot-search-modern .speedshot-search-input::placeholder {
    color: #6b7280;
}

.speedshot-search-modern .speedshot-search-button {
    background: #000000;
    color: #ffffff;
}

.speedshot-search-modern .speedshot-search-button:hover {
    background: #1f2937;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.speedshot-search-modern .speedshot-search-input-wrapper:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.speedshot-search-modern .speedshot-search-input-wrapper:focus-within {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

/* Tablets (768px und kleiner) */
@media (max-width: 768px) {
    .speedshot-search-wrapper {
        max-width: 100%;
        padding: 0 16px;
    }
    
    .speedshot-search-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 14px 16px 14px 48px;
    }
    
    .speedshot-search-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mobile (480px und kleiner) */
@media (max-width: 480px) {
    .speedshot-search-wrapper {
        padding: 0 12px;
    }
    
    .speedshot-search-input-wrapper {
        flex-direction: column;
        border-radius: 12px;
        padding: 4px;
    }
    
    .speedshot-search-icon {
        position: absolute;
        left: 16px;
        top: 16px;
    }
    
    .speedshot-search-input {
        width: 100%;
        padding: 14px 16px 14px 45px;
        border-radius: 8px;
    }
    
    .speedshot-search-button {
        width: 100%;
        margin: 0;
        padding: 14px;
        border-radius: 8px;
        font-size: 15px;
    }
    
    /* Minimal Style auf Mobile */
    .speedshot-search-minimal .speedshot-search-input-wrapper {
        border-radius: 8px;
    }
    
    .speedshot-search-minimal .speedshot-search-input,
    .speedshot-search-minimal .speedshot-search-button {
        border-radius: 6px;
    }
    
    /* Modern Style auf Mobile */
    .speedshot-search-modern .speedshot-search-input-wrapper {
        border-radius: 10px;
    }
    
    .speedshot-search-modern .speedshot-search-input-wrapper::before {
        border-radius: 8px;
    }
}

/* Sehr kleine Geräte (360px und kleiner) */
@media (max-width: 360px) {
    .speedshot-search-input {
        font-size: 15px;
        padding: 12px 12px 12px 42px;
    }
    
    .speedshot-search-icon {
        left: 12px;
        width: 18px;
        height: 18px;
    }
    
    .speedshot-search-button {
        padding: 12px;
        font-size: 14px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .speedshot-search-input-wrapper {
        background: #ffffff;
        border-color: #4b5563;
    }
    
    .speedshot-search-input {
        color: #000000;
        background: #ffffff;
    }
    
    .speedshot-search-input::placeholder {
        color: #6b7280;
    }
    
    .speedshot-search-icon {
        color: #6b7280;
    }
    
    .speedshot-search-input-wrapper:focus-within .speedshot-search-icon {
        color: #1f2937;
    }
    
    .speedshot-search-input-wrapper:hover {
        border-color: #6b7280;
    }
}

/* Accessibility */
.speedshot-search-button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.speedshot-search-input:focus-visible {
    outline: none;
}

/* Loading State (optional - für zukünftige Features) */
.speedshot-search-form.loading .speedshot-search-button {
    opacity: 0.7;
    cursor: not-allowed;
}

.speedshot-search-form.loading .speedshot-search-button::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Clear Button */
.speedshot-search-clear {
    position: absolute;
    right: 140px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.speedshot-search-clear:hover {
    color: #ef4444;
}

.speedshot-search-clear svg {
    width: 16px;
    height: 16px;
}

/* Error State */
.speedshot-search-input.speedshot-search-error {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mobile: Clear Button anpassen */
@media (max-width: 480px) {
    .speedshot-search-clear {
        right: 8px;
        top: 8px;
    }
}
