/* ==============================================
   FIXES & MISSING STYLES
   Complementa styles.css con clases faltantes
=============================================== */

/* ================================
   SEARCH CONTAINER & BAR
================================ */
.search-container {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.search-bar:focus-within {
    border-color: rgba(90, 200, 250, 0.5);
    background: rgba(90, 200, 250, 0.08);
    box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.15),
                0 4px 24px rgba(0, 0, 0, 0.25);
}

.search-icon {
    color: var(--gray-4, #8e8e93);
    font-size: 22px;
    margin-right: 14px;
    flex-shrink: 0;
    transition: color 0.3s ease;
    pointer-events: none;
}

.search-bar:focus-within .search-icon {
    color: #5AC8FA;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    font-family: inherit;
    font-weight: 400;
    padding: 18px 0;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--gray-5, #636366);
    font-weight: 400;
}

/* clear-search ya existe en styles.css con posición absolute,
   aquí se asegura que funcione dentro del nuevo .search-bar */
.search-bar .clear-search {
    position: static;
    transform: none;
    flex-shrink: 0;
    margin-left: 8px;
}

/* ================================
   FORM INPUT (auth modal usa .form-input,
   styles.css define .form-control — alias)
================================ */
.form-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05),
                0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-input::placeholder {
    color: var(--gray-5, #636366);
    font-weight: 400;
}

.form-input:focus {
    outline: none;
    border-color: #007AFF;
    background: rgba(90, 200, 250, 0.1);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* ================================
   BTN-PRIMARY base (no anidado)
================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #5AC8FA 0%, #007AFF 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(90, 200, 250, 0.4);
    background: linear-gradient(135deg, #6BD3FF 0%, #1A8AFF 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ================================
   BTN-SECONDARY base
================================ */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--gray-3, #ebebf0);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: white;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ================================
   BTN-FULL (ancho completo)
================================ */
.btn-full {
    width: 100%;
}

/* ================================
   AUTH MODAL — estado de carga
================================ */
.auth-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.auth-btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin-btn 0.7s linear infinite;
    vertical-align: middle;
}

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

/* ================================
   RESPONSIVE SEARCH
================================ */
@media (max-width: 600px) {
    .search-bar {
        border-radius: 16px;
        padding: 0 16px;
    }

    .search-input {
        font-size: 15px;
        padding: 15px 0;
    }

    .search-icon {
        font-size: 20px;
        margin-right: 10px;
    }
}
