﻿/* ============================================================
   REFRESH GLOBAL — POPUP SEARCH COMPONENT
   FILE: wwwroot/css/search.css

   PURPOSE:
       • Standalone popup search box
       • Hidden by default
       • Opens when clicking search icon
       • Closes on outside click or ESC
       • Smooth animation
       • Corporate, minimal, premium
   ============================================================ */


/* ============================================================
   SEARCH ICON (ALWAYS VISIBLE)
   ============================================================ */
.search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.65rem;
    color: #fff;
    transition: color 0.25s ease;
}

    .search-trigger:hover {
        color: #0066cc;
    }


/* ============================================================
   POPUP SEARCH BOX (HIDDEN BY DEFAULT)
   ============================================================ */
.search-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px 14px;
    width: 280px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
}

    /* When active (opened) */
    .search-popup.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }


/* ============================================================
   SEARCH FORM
   ============================================================ */
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ============================================================
   SEARCH INPUT
   ============================================================ */
.search-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s ease;
}

    .search-input:focus {
        border-color: #0066cc;
    }


/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.search-submit {
    background: #0066cc;
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.25s ease;
}

    .search-submit:hover {
        background: #004c99;
    }


/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {

    .search-popup {
        right: 10px;
        width: 240px;
    }

    .search-input {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    .search-popup {
        right: 6px;
        width: 220px;
    }

    .search-input {
        font-size: 0.82rem;
    }
}
