/*
Theme Name: Lightning Child EXQU-rent
Theme URI: 
Template: lightning
Description: エクスクレントさん専用テーマです
Author: 
Tags: 
Version: 0.6.0
*/

/*---------------------------------
デスクトップ用ヘッダーに検索ボックスを設置
---------------------------------*/

@media screen and (max-width:959px) {
  /* モバイル > ヘッダーのナビゲーションバーに検索ボックスを追加 */
  .site-header-container .search-form {
    display: none;
  }
}

@media screen and (min-width:960px) {
  /*---------------------------------
  デスクトップ > 検索フォーム本体
  ---------------------------------*/
  .site-header-container .search-form {
    position: relative;
    margin-left: 32px;
  }

  /*---------------------------------
  虫眼鏡アイコン
  ---------------------------------*/
  .site-header-container .search-form::after {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    margin: 0;
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /*---------------------------------
  検索フィールド
  ---------------------------------*/
  .site-header-container .search-field {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    z-index: 9999;
    opacity: 0;
    width: 56px;
    height: 56px;
    padding: 0;
    cursor: pointer;
    outline: none;
    border-width: 0px;
  }

  /*---------------------------------
  submitボタン非表示
  ---------------------------------*/
  .site-header-container .search-submit {
    display: none;
  }

  /*---------------------------------
  フォーカス時アイコン変更
  ---------------------------------*/
  .site-header-container .search-form:has(.search-field:focus)::after {
    content: "\f00d";
    color: var(--vk-color-primary);
    z-index: 9999;
    cursor: pointer;
    font-size: 1.1em;
  }

  /*---------------------------------
  フォーカス時
  ---------------------------------*/
  .site-header-container form .search-field:focus {
    opacity: 1;
    position: fixed;
    top: 110px;
    left: 10%;
    transform: none;
    width: 80% !important;
    height: 64px;
    background: #fff;
    z-index: 99999;
    min-width: 0;
    max-width: none;
    border-width: 0px;
    outline: none;
    border-radius: 15px;
    padding: 1em;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: SearchBoxFade 0.25s ease;
  }
}

@keyframes SearchBoxFade {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}