/* =========================================================
   Y2SaverPro — GLOBAL SEARCH FORM
   Single final visual system
   Existing JS IDs preserved
   ========================================================= */

.y2-global-search-form,
#search-form.y2-global-search-form {
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    padding:0 !important;
    box-sizing:border-box !important;
}

.y2-global-search-form *,
.y2-global-search-form *::before,
.y2-global-search-form *::after {
    box-sizing:border-box !important;
}

/* Main layout */
.y2-global-search-form .y2-premium-search-box {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 48px 108px !important;
    align-items:center !important;
    gap:7px !important;
    width:100% !important;
    max-width:850px !important;
    height:56px !important;
    min-height:56px !important;
    margin:0 auto !important;
    padding:5px !important;
    background:#fff !important;
    border:1px solid #e1e6ee !important;
    border-radius:14px !important;
    box-shadow:0 7px 20px rgba(16,24,40,.08) !important;
}

/* Flatten old structural wrappers */
.y2-global-search-form .y2-premium-main,
.y2-global-search-form .y2-premium-actions {
    display:contents !important;
}

/* Input area */
.y2-global-search-form .y2-premium-input-area {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
}

/* Search/link icon */
.y2-global-search-form .y2-premium-link-icon {
    position:absolute !important;
    left:13px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    z-index:2 !important;
    width:18px !important;
    height:18px !important;
    margin:0 !important;
    padding:0 !important;
    color:#526174 !important;
    pointer-events:none !important;
}

.y2-global-search-form .y2-premium-link-icon svg {
    display:block !important;
    width:18px !important;
    height:18px !important;
}

/* Input wrapper */
.y2-global-search-form .y2-premium-input-wrap {
    position:relative !important;
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
}

/* Input */
.y2-global-search-form #txt-url,
.y2-global-search-form .y2-premium-input {
    display:block !important;
    width:100% !important;
    height:46px !important;
    margin:0 !important;
    padding:0 12px 0 40px !important;
    border:0 !important;
    outline:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    color:#172033 !important;
    font-size:14px !important;
    font-weight:400 !important;
    line-height:46px !important;
}

.y2-global-search-form #txt-url::placeholder,
.y2-global-search-form .y2-premium-input::placeholder {
    color:#8b95a7 !important;
    opacity:1 !important;
}

/* Hide old support/benefit presentation */
.y2-global-search-form .y2-premium-support,
.y2-global-search-form .y2-premium-benefits {
    display:none !important;
}

/* Paste */
.y2-global-search-form #btn-paste,
.y2-global-search-form .y2-premium-action {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:48px !important;
    min-width:48px !important;
    max-width:48px !important;
    height:46px !important;
    min-height:46px !important;
    max-height:46px !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid #e0e5ed !important;
    border-radius:10px !important;
    background:#fff !important;
    color:#526174 !important;
    box-shadow:none !important;
    cursor:pointer !important;
}

.y2-global-search-form #btn-paste:hover {
    background:#f7f9fc !important;
    border-color:#d5dce7 !important;
    color:#172033 !important;
}

.y2-global-search-form #btn-paste svg {
    display:block !important;
    width:19px !important;
    height:19px !important;
    fill:none !important;
    stroke:currentColor !important;
}

/* Search / Download */
.y2-global-search-form #btn-submit {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    width:108px !important;
    min-width:108px !important;
    max-width:108px !important;
    height:46px !important;
    min-height:46px !important;
    max-height:46px !important;
    margin:0 !important;
    padding:0 10px !important;
    border:0 !important;
    border-radius:10px !important;
    background:#ef3340 !important;
    color:#fff !important;
    font-size:13px !important;
    font-weight:700 !important;
    line-height:1 !important;
    box-shadow:0 6px 14px rgba(239,51,64,.18) !important;
    cursor:pointer !important;
}

.y2-global-search-form #btn-submit:hover {
    background:#dc2634 !important;
    transform:translateY(-1px) !important;
}

.y2-global-search-form #btn-submit .icon {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
}

.y2-global-search-form #btn-submit .icon svg {
    display:block !important;
    width:19px !important;
    height:19px !important;
    fill:none !important;
    stroke:#fff !important;
}

/* Dark mode */
html.y2-dark-mode .y2-global-search-form .y2-premium-search-box {
    background:#111827 !important;
    border-color:#334155 !important;
    box-shadow:none !important;
}

html.y2-dark-mode .y2-global-search-form #txt-url,
html.y2-dark-mode .y2-global-search-form .y2-premium-input {
    color:#f8fafc !important;
}

html.y2-dark-mode .y2-global-search-form #txt-url::placeholder,
html.y2-dark-mode .y2-global-search-form .y2-premium-input::placeholder {
    color:#94a3b8 !important;
}

html.y2-dark-mode .y2-global-search-form #btn-paste,
html.y2-dark-mode .y2-global-search-form .y2-premium-action {
    background:#111827 !important;
    border-color:#334155 !important;
    color:#cbd5e1 !important;
}

/* Mobile */
@media (max-width:560px) {

    .y2-global-search-form .y2-premium-search-box {
        grid-template-columns:minmax(0,1fr) 46px !important;
        grid-template-rows:43px 43px !important;
        gap:5px !important;
        height:91px !important;
        min-height:91px !important;
        padding:5px !important;
        border-radius:13px !important;
    }

    .y2-global-search-form .y2-premium-input-area {
        grid-column:1 / 3 !important;
        grid-row:1 !important;
        height:43px !important;
    }

    .y2-global-search-form .y2-premium-input-wrap,
    .y2-global-search-form #txt-url,
    .y2-global-search-form .y2-premium-input {
        height:43px !important;
    }

    .y2-global-search-form #txt-url,
    .y2-global-search-form .y2-premium-input {
        padding-left:39px !important;
        font-size:14px !important;
        line-height:43px !important;
    }

    .y2-global-search-form .y2-premium-link-icon {
        left:13px !important;
    }

    .y2-global-search-form #btn-paste,
    .y2-global-search-form .y2-premium-action {
        grid-column:2 !important;
        grid-row:2 !important;
        width:46px !important;
        min-width:46px !important;
        max-width:46px !important;
        height:43px !important;
        min-height:43px !important;
        max-height:43px !important;
    }

    .y2-global-search-form #btn-submit {
        grid-column:1 !important;
        grid-row:2 !important;
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        height:43px !important;
        min-height:43px !important;
        max-height:43px !important;
        border-radius:10px !important;
    }
}
