/**
 * 洋屿子主题 - 搜索框美化样式
 * 由 xy-search-effects.php 通过 body_class 注入 xy-search-style-1~4，
 * 仅作用于首页顶部多功能组件中的 .header-slider-search。
 */

/* ============================================================
   公共基础：让 .header-slider-search 的 .search-input / .line-form 可承载自定义外观
   ============================================================ */
body.xy-search-style-1 .header-slider-search .search-input,
body.xy-search-style-2 .header-slider-search .search-input,
body.xy-search-style-3 .header-slider-search .search-input,
body.xy-search-style-4 .header-slider-search .search-input {
    transition: all .3s ease;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* ============================================================
   样式一：显眼包（圆角白底 + 红色胶囊按钮 + 半透明白边，复刻参考站）
   ============================================================ */
body.xy-search-style-1 .header-slider-search .line-form {
    border: 5px solid rgb(255 255 255 / 18%) !important;
    border-radius: 30px !important;
    background: #fff !important;
    overflow: hidden !important;
}
body.xy-search-style-1 .header-slider-search .line-form .search-input-text input {
    background: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    height: 50px !important;
    color: #333 !important;
}
body.xy-search-style-1 .header-slider-search .line-form .abs-right button {
    background: #fc3c2d !important;
    border: 1px solid #fc3c2d !important;
    color: #fff !important;
    border-radius: 1px 30px 30px 1px !important;
    height: 40px !important;
    margin: 0 5px 0 0 !important;
    padding: 0 18px !important;
}
body.xy-search-style-1 .header-slider-search .line-form .abs-right button .icon {
    color: #fff !important;
}

/* ============================================================
   样式二：方形按钮（5px 白边 + 5px 圆角 + 蓝色方块按钮，复刻参考站）
   ============================================================ */
body.xy-search-style-2 .header-slider-search .search-form {
    border: 5px solid rgb(255 255 255 / 30%) !important;
    border-radius: 5px !important;
    padding: 0 !important;
    font-size: 15px !important;
}
body.xy-search-style-2 .header-slider-search .line-form {
    border-radius: 0px !important;
    background: #fff !important;
}
body.xy-search-style-2 .header-slider-search .line-form .abs-right button {
    background: #0088ff !important;
    color: rgb(255, 255, 255) !important;
    margin-right: -23px !important;
    height: 46.42px !important;
    padding: 10px !important;
    border: none !important;
}
@media(max-width: 767px) {
    body.xy-search-style-2 .header-slider-search .line-form .abs-right button {
        margin-right: -16px !important;
        height: 38px !important;
    }
}
body.xy-search-style-2 .header-slider-search .line-form .abs-right .icon {
    color: #fff !important;
}

/* ============================================================
   样式三：两按钮（开始探索 / 创作者入驻，复刻参考站页脚注入方案）
   按钮由 JS 注入 .search-custom-btns 到 .header-slider-search .line-form
   关键：.line-form 用 flex，但原生 .search-input-text 必须 flex:1 撑满，
   否则会被 flex 收缩压短；同时隐藏原生 .abs-right 放大镜避免重叠。
   ============================================================ */
body.xy-search-style-3 .header-slider-search .search-input .line-form {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #fff !important;
    border-radius: var(--main-radius, 8px) !important;
    padding: 4px 6px !important;
}
body.xy-search-style-3 .header-slider-search .search-input .line-form .search-input-text {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}
body.xy-search-style-3 .header-slider-search .search-input .line-form .search-input-text input {
    background: transparent !important;
    border: none !important;
    color: #333 !important;
}
body.xy-search-style-3 .header-slider-search .search-input .line-form .abs-right {
    display: none !important;
}
body.xy-search-style-3 .header-slider-search .search-custom-btns {
    display: flex !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
}
body.xy-search-style-3 .header-slider-search .search-custom-btns .but {
    border-radius: var(--main-radius, 8px) !important;
    white-space: nowrap !important;
    padding: 4px 16px !important;
    font-size: 14px !important;
}

/* ============================================================
   样式四：方形框一（wayan 美化二：渐变 搜索 + 投稿）
   按钮由 JS 注入 .abs-right，渐变/圆角均为 inline style（wayan 同款），
   此处负责表单边框 kun66cn_search_frame + 右对齐 + 白底 + 输入区内边距
   ============================================================ */
body.xy-search-style-4 .header-slider-search .search-form.kun66cn_search_frame {
    border: 5px solid rgb(255 255 255 / 30%) !important;
    border-radius: 45px !important;
    padding: 0 !important;
    font-size: 15px !important;
}
body.xy-search-style-4 .header-slider-search .line-form {
    background: #fff !important;
    border-radius: 40px !important;
}
body.xy-search-style-4 .header-slider-search .search-form.kun66cn_search_frame .search-input-text input {
    padding-right: 170px !important;
}
body.xy-search-style-4 .header-slider-search .search-form.kun66cn_search_frame .abs-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    right: 8px !important;
}

/* ============================================================
   暗夜模式微调
   ============================================================ */
/* 样式一：暗夜保持白底（参考站搜索框本就是白底，红胶囊按钮在暗夜更显眼） */
body.dark-theme.xy-search-style-1 .header-slider-search .line-form {
    background: #fff !important;
}
/* 样式二：暗夜按钮用更深蓝 */
body.dark-theme.xy-search-style-2 .header-slider-search .line-form .abs-right button {
    background: #2563eb !important;
}
/* 样式三 / 四：暗夜保持白底（参考站搜索框本就是白底） */
body.dark-theme.xy-search-style-3 .header-slider-search .search-input .line-form,
body.dark-theme.xy-search-style-4 .header-slider-search .line-form {
    background: #fff !important;
}

/* ============================================================
   顶部多功能组件效果（复刻 wayan 子主题 yangau.cn 同款）

   灯片下方动态波浪 —— 复刻 wayan dhwave.js + CSS：
   - JS 给 .header-slider-container .swiper-wrapper 注入 SVG（绝对定位
     bottom:0 z-index:10 高90px），内含 gentle-wave 波浪 path + 4 层
     <use class="xy-parallax">（y=0/3/5/7 错位）
   - 动画：.xy-parallax > use 用 move-forever keyframes 横向移动，
     4 层不同 duration/opacity 形成纵深；填充色跟随 --body-bg-color
     （zibll 变量，自动适配暗夜模式）
   ============================================================ */
.xy-slider-wave-svg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 90px;
    z-index: 10;
    pointer-events: none;
    display: block;
}
.xy-parallax {
    fill: var(--body-bg-color, #fff);
}
.xy-parallax > use {
    animation: xyMoveForever 30s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.xy-parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; opacity: 0.5; }
.xy-parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; opacity: 0.6; }
.xy-parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; opacity: 0.7; }
.xy-parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; opacity: 1; }
@keyframes xyMoveForever {
    0%   { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}
@media screen and (max-width: 768px) {
    .xy-slider-wave-svg {
        height: 45px;
    }
}

/*首页幻灯片底部虚化 开始*/
body.xy-search-slider-blur .absolute::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 58%;
    right: 0;
    bottom: 0;
    transform: scale(1.01);
    background: linear-gradient(180deg, rgb(255 255 255 / 0%) 0%, var(--body-bg-color) 100%);
}
/*首页幻灯片底部虚化 结束*/
/* ============================================================
   叠加封面卡片组件效果（右下角显示版权/标识图）
   针对顶部多功能组件的图标卡片（.icon-cover-card），
   与 yangau.cn 保持一致：直接给卡片容器加背景图，
   background-size: 15% auto; background-position: right bottom;
   ============================================================ */
body.xy-search-slider-cover .icon-cover-card {
    background-image: var(--xy-cover-img, none) !important;
    background-size: 15% auto !important;
    background-position: right bottom !important;
    background-repeat: no-repeat !important;
}
