/* Elementor Search Widget Styles - Sliding Version */
.elementor-search-form {
    position: relative;
    width: auto;
    max-width: none;
}

.elementor-search-form__container {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 36px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 50px;
    /* เริ่มต้นแสดงเฉพาะปุ่ม */
    height: 39px;
}

.elementor-search-form__container.expanded {
    width: 350px;
    /* ขยายเมื่อเปิด */
    border-color: #007cba;
    box-shadow: 0 0 15px rgba(0, 124, 186, 0.3);
}

.elementor-search-form__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 9px 0px 9px 50px;
    font-size: 16px;
    background: transparent;
    transition: all 0.3s ease;
    opacity: 0;
    /* ซ่อนไว้เริ่มต้น */
    width: 0;
    pointer-events: none;
    min-width: 0;
    /* ป้องกันไม่ให้ขยายเกินขอบ */
    max-width: calc(100% - 60px);
    /* สำรองพื้นที่ให้ปุ่ม */
}

.elementor-search-form__container.expanded .elementor-search-form__input {
    opacity: 1;
    width: auto;
    pointer-events: auto;
    max-width: calc(100% - -5px);
    font-family: 'IBM Plex Sans Thai';
    /* สำรองพื้นที่ให้ปุ่มและปุ่มปิด */
}

.elementor-search-form__input::placeholder {
    color: #999;
}

.elementor-search-form__submit {
    border: none;
    /* background: #007cba; */
    color: white;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    right: 0;
    top: -9px;
    z-index: 2;
    /* ล็อคตำแหน่งไม่ให้เปลี่ยน */
    transform: none !important;
    animation: none !important;
}

.elementor-search-form__container.expanded .elementor-search-form__submit {
    /* border-radius: 0 23px 23px 0; */
    /* width: 50px; */
    position: absolute;
    /* right: 0; */
    /* top: -10px; */
}

.elementor-search-form__submit:hover {
    /* background: #005a87; */
    /* transform: scale(1.05); */
}

.elementor-search-form__submit svg,
.elementor-search-form__submit i {
    width: 19px !important;
    height: 19px !important;
    /* fill: currentColor; */
    transition: none !important;
    transform: none !important;
    animation: none !important;
    /* ล็อค icon ไม่ให้เปลี่ยนแปลง */
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
}

.elementor-search-form__container.expanded .elementor-search-form__submit svg,
.elementor-search-form__container.expanded .elementor-search-form__submit i {
    /* transform: rotate(90deg); */
    transform: none !important;
    transition: none !important;
    animation: none !important;
    /* ล็อค icon ตอน expanded */
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
}

/* Close button when expanded */
.elementor-search-form__close {
    position: absolute;
    left: 9px;
    top: 55%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.elementor-search-form__container.expanded .elementor-search-form__close {
    opacity: 1;
    pointer-events: auto;
}

.elementor-search-form__close:hover {
    /* color: #ffffff; */
    background-color: white;
    /* transform: translateY(-50%) scale(1.1); */
}

.elementor-search-form__close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    padding-top: 20px;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-suggestions.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-suggestion-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.search-suggestion-item:active {
    background-color: #e9ecef;
}

.suggestion-icon {
    width: 16px;
    height: 16px;
    color: #666;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 500;
    color: #333;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.suggestion-type {
    font-size: 12px;
    color: #666;
    margin: 2px 0 0 0;
}

.suggestion-highlight {
    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Loading State */
.search-suggestions.loading {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.search-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* No Results */
.search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Backdrop for mobile */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Only apply to desktop version on mobile */
    .elementor-search-form.desktop-version .elementor-search-form__container.expanded {
        width: 300px;
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    }

    .elementor-search-form.desktop-version .elementor-search-form__input {
        padding: 10px 16px;
        font-size: 14px;
    }

    .elementor-search-form.desktop-version .search-suggestion-item {
        padding: 10px 16px;
    }

    .elementor-search-form.desktop-version .suggestion-title {
        font-size: 13px;
    }
}

@media (max-width: 480px) {

    /* Only apply to desktop version on small mobile */
    .elementor-search-form.desktop-version .elementor-search-form__container.expanded {
        width: calc(100vw - 40px);
        top: 10px;
        left: 20px;
        transform: none;
    }
}

/* Animation Effects - ปรับลด */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.elementor-search-form__container.expanded .elementor-search-form__input {
    animation: slideIn 0.4s ease 0.2s both;
}

.elementor-search-form__container.expanded .elementor-search-form__close {
    animation: slideIn 0.4s ease 0.3s both;
}

/* ลบ animation ที่ทำให้ปุ่มเด้ง */
.elementor-search-form__submit {
    animation: none !important;
}

.elementor-search-form__submit:focus {
    animation: none !important;
    outline: none;
}

/* Pulse effect for button - ปิดใช้งาน */
/*
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 124, 186, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0);
    }
}

.elementor-search-form__submit:focus {
    animation: pulse 1.5s infinite;
}
*/

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .elementor-search-form__container {
        background: #2d3748;
        border-color: #4a5568;
    }

    .elementor-search-form__input {
        color: #000000;
    }

    .elementor-search-form__input::placeholder {
        color: #a0aec0;
    }

    .search-suggestions {
        background: #000000;
        border-color: #000000;
    }

    .search-suggestion-item {
        border-color: #4a5568;
    }

    .search-suggestion-item:hover,
    .search-suggestion-item.selected {
        background-color: #000000;
    }

    .suggestion-title {
        color: #e2e8f0;
    }

    .suggestion-type {
        color: #a0aec0;
    }

    .elementor-search-form__close {
        color: #a0aec0;
    }

    .elementor-search-form__close:hover {
        color: #e2e8f0;
    }
}

/* Custom Styles for Different Screen Sizes */

/* Desktop/Tablet Search Form */
.elementor-search-form.desktop-version {
    display: block;
}

.elementor-search-form.mobile-version {
    display: none;
}

.elementor-search-form.all-devices {
    display: block;
}

/* Override Elementor Responsive Hide Classes for Mobile Search */
@media (max-width: 1024px) {

    /* Force show mobile version on tablets and mobile */
    .elementor-hidden-tablet .elementor-search-form.mobile-version,
    .elementor-element.elementor-hidden-tablet .elementor-search-form.mobile-version {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 767px) {

    /* Force show mobile version on mobile devices */
    .elementor-hidden-mobile .elementor-search-form.mobile-version,
    .elementor-element.elementor-hidden-mobile .elementor-search-form.mobile-version,
    .elementor-hidden-desktop.elementor-hidden-tablet .elementor-search-form.mobile-version,
    .elementor-element.elementor-hidden-desktop.elementor-hidden-tablet .elementor-search-form.mobile-version {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Mobile Search Form */
@media (max-width: 768px) {
    .elementor-search-form.desktop-version {
        display: none !important;
    }

    .elementor-search-form.mobile-version {
        display: block !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__container {
        position: relative;
        width: 50px !important;
        height: 50px !important;
        border-radius: 25px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded {
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        width: calc(100vw - 40px) !important;
        height: 60px !important;
        z-index: 999 !important;
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3) !important;
        border-radius: 30px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__submit {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        /* font-size: 16px !important; */
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__submit svg,
    .elementor-search-form.mobile-version .elementor-search-form__submit i {
        width: 22px !important;
        height: 22px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__submit {
        width: 60px !important;
        height: 60px !important;
        border-radius: 0 28px 28px 0 !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__input {
        max-width: calc(100% - 70px) !important;
        /* สำรองพื้นที่ให้ปุ่ม mobile */
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__input {
        max-width: calc(100% - 120px) !important;
        /* สำรองพื้นที่ให้ปุ่มและปุ่มปิดบน mobile */
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__submit svg,
    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__submit i {
        width: 24px !important;
        height: 24px !important;
    }

    /* Override desktop responsive styles for mobile version */
    .elementor-search-form.mobile-version .elementor-search-form__container.expanded {
        transform: none !important;
        left: 20px !important;
        top: 20px !important;
    }
}

/* Enhanced Mobile Search Button */
@media (max-width: 480px) {
    .elementor-search-form.mobile-version .elementor-search-form__container {
        width: 45px !important;
        height: 45px !important;
        border-radius: 22.5px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__submit {
        width: 45px !important;
        height: 45px !important;
        font-size: 14px !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__submit svg,
    .elementor-search-form.mobile-version .elementor-search-form__submit i {
        width: 20px !important;
        height: 20px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded {
        width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
        height: 55px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__submit {
        width: 55px !important;
        height: 55px !important;
    }

    .elementor-search-form.mobile-version .elementor-search-form__input {
        max-width: calc(100% - 55px) !important;
        /* สำรองพื้นที่ให้ปุ่ม small mobile */
    }

    .elementor-search-form.mobile-version .elementor-search-form__container.expanded .elementor-search-form__input {
        max-width: calc(100% - 110px) !important;
        /* สำรองพื้นที่ให้ปุ่มและปุ่มปิดบน small mobile */
    }
}

/* Force Mobile Version Visibility and Styles */
@media (max-width: 768px) {

    /* Override Elementor responsive classes */
    .elementor-hidden-desktop.elementor-hidden-tablet .elementor-search-form.mobile-version {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Force mobile widget to show even with Elementor hidden classes */
    .elementor-hidden-desktop .spectrum-search-debug.mobile-version,
    .elementor-hidden-tablet .spectrum-search-debug.mobile-version {
        display: block !important;
        visibility: visible !important;
    }

    /* Ensure mobile version is always visible on mobile */
    .elementor-search-form.mobile-version {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Hide desktop version completely on mobile */
    .elementor-search-form.desktop-version {
        display: none !important;
        visibility: hidden !important;
    }

    /* Handle 'all-devices' option */
    .elementor-search-form.all-devices {
        display: block !important;
    }

    /* Mobile button specific styles */
    .elementor-search-form.mobile-version .elementor-search-form__submit {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        /* background: #007cba !important; */
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 2 !important;
        /* Touch-friendly */
        min-height: 44px !important;
        min-width: 44px !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }

    .elementor-search-form.mobile-version .elementor-search-form__submit:active {
        /* transform: scale(0.95) !important; */
        /* background: #005a87 !important; */
    }

    /* Mobile input styles */
    .elementor-search-form.mobile-version .elementor-search-form__input {
        padding: 8px 15px !important;
        font-size: 14px !important;
        border: none !important;
        outline: none !important;
        background: transparent !important;
    }

    /* Mobile suggestions positioning */
    .elementor-search-form.mobile-version .search-suggestions {
        position: fixed !important;
        top: 80px !important;
        left: 20px !important;
        right: 20px !important;
        width: calc(100vw - 40px) !important;
        max-height: 250px !important;
        z-index: 1000 !important;
    }
}

/* Custom Styles Based on Parent Elementor Section */

/* Black Icon for Section 305 */
.elementor-305 .elementor-search-form__submit {
    background: transparent !important;
    border: none !important;
    color: #000 !important;
    box-shadow: none !important;
}

.elementor-305 .elementor-search-form__submit svg,
.elementor-305 .elementor-search-form__submit i {
    color: #000 !important;
    /* fill: #000 !important; */
}


.elementor-305 .elementor-search-form__submit:hover {
    /* background: rgba(0, 0, 0, 0.1) !important; */
    color: #000 !important;
    /* transform: scale(1.05); */
}

.elementor-305 .elementor-search-form__submit:active {
    /* background: rgba(0, 0, 0, 0.2) !important; */
}

.elementor-305 .elementor-search-form__container {
    border: none !important;
    background: transparent !important;
}

/* White Icon for Section 25 */
.elementor-25 .elementor-search-form__submit {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    box-shadow: none !important;
}

.elementor-25 .elementor-search-form__submit svg,
.elementor-25 .elementor-search-form__submit i {
    color: #fff !important;
    /* fill: #fff !important; */
}

body.dark-mode .elementor-25 .elementor-search-form__submit svg,
body.dark-mode .elementor-25 .elementor-search-form__submit i {
    color: #ffffff00 !important;
    /* fill: #fff !important; */
}

.elementor-25 .elementor-search-form__submit svg circle,
.elementor-25 .elementor-search-form__submit svg path,
.elementor-25 .elementor-search-form__submit i {
    stroke: #fff !important;
}

body.dark-mode .elementor-25 .elementor-search-form__submit svg circle,
body.dark-mode .elementor-25 .elementor-search-form__submit svg path {
    stroke: #fff !important;
}

.elementor-25 .elementor-search-form__submit:hover {
    /* background: rgba(255, 255, 255, 0.1) !important; */
    color: #fff !important;
    /* transform: scale(1.05); */
}

.elementor-25 .elementor-search-form__submit:active {
    /* background: rgba(255, 255, 255, 0.2) !important; */
}

.elementor-25 .elementor-search-form__container {
    border: none !important;
    background: transparent !important;
}

/* Expanded State Adjustments for Custom Sections */
.elementor-305 .elementor-search-form__container.expanded {
    z-index: 999 !important;
    background: #fff !important;
    border: 2px solid #e0e0e0 !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1) !important;
}

.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit {
    background: #ffffff !important;
    color: #000000 !important;
}

.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit svg,
.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit i {
    color: #000000 !important;
    /* fill: #000000 !important; */
}

.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit svg path,
.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit svg circle,
.elementor-305 .elementor-search-form__container.expanded .elementor-search-form__submit i {
    stroke: #000000 !important;
}

.elementor-25 .elementor-search-form__container.expanded {
    z-index: 999 !important;
    background: rgba(255, 255, 255, 1) !important;
    /* border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1) !important; */
}

.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit {
    /* background: #ffffff !important; */
    color: #000000 !important;
}

.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit svg,
.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit i {
    color: #000000 !important;
    /* fill: #000000 !important; */
}

.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit svg path,
.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit svg circle,
.elementor-25 .elementor-search-form__container.expanded .elementor-search-form__submit i {
    stroke: #000000 !important;
}

/* === ล็อค icon ไม่ให้เด้งทุกสถานการณ์ - เวอร์ชันแข็งแกร่ง === */
.elementor-search-form__submit,
.elementor-search-form__submit *,
.elementor-search-form__submit svg,
.elementor-search-form__submit svg *,
.elementor-search-form__submit i,
.elementor-search-form__submit svg path,
.elementor-search-form__submit svg circle,
.elementor-search-form__submit svg rect,
.elementor-search-form__submit svg line,
.elementor-search-form__submit svg polyline,
.elementor-search-form__submit svg polygon {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    position: static !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
}

/* ล็อคปุ่มเมื่อ hover และ active - แข็งแกร่ง */
.elementor-search-form__submit:hover,
.elementor-search-form__submit:active,
.elementor-search-form__submit:focus,
.elementor-search-form__submit:visited,
.elementor-search-form__submit:target {
    transform: none !important;
    animation: none !important;
    outline: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
}

.elementor-search-form__submit:hover *,
.elementor-search-form__submit:active *,
.elementor-search-form__submit:focus *,
.elementor-search-form__submit:visited *,
.elementor-search-form__submit:target *,
.elementor-search-form__submit:hover svg,
.elementor-search-form__submit:active svg,
.elementor-search-form__submit:focus svg,
.elementor-search-form__submit:visited svg,
.elementor-search-form__submit:target svg,
.elementor-search-form__submit:hover svg *,
.elementor-search-form__submit:active svg *,
.elementor-search-form__submit:focus svg *,
.elementor-search-form__submit:visited svg *,
.elementor-search-form__submit:target svg *,
.elementor-search-form__submit:hover i,
.elementor-search-form__submit:active i,
.elementor-search-form__submit:focus i,
.elementor-search-form__submit:visited i,
.elementor-search-form__submit:target i {
    transform: none !important;
    animation: none !important;
    transition: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
}

/* บังคับไม่ให้มี animation ไม่ว่าจากไหน - เวอร์ชันสุดท้าย */
.elementor-search-form__submit,
.elementor-search-form__submit *,
.elementor-search-form__submit svg,
.elementor-search-form__submit svg *,
.elementor-search-form__submit i {
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    animation: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    transform: none !important;
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-timing-function: linear !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    animation-direction: normal !important;
    animation-fill-mode: none !important;
    animation-play-state: paused !important;
}

/* ล็อคตำแหน่งแน่นหนา */
.elementor-search-form__submit {
    will-change: auto !important;
    backface-visibility: visible !important;
    perspective: none !important;
}

/* ป้องกัน CSS keyframes ภายนอก */
@keyframes * {
    0%, 100% {
        transform: none !important;
    }
}

/* ป้องกัน vendor keyframes */
@-webkit-keyframes * {
    0%, 100% {
        -webkit-transform: none !important;
        transform: none !important;
    }
}

@-moz-keyframes * {
    0%, 100% {
        -moz-transform: none !important;
        transform: none !important;
    }
}

/* === เพิ่มล็อค SVG แบบเฉพาะเจาะจง === */
.elementor-search-form__submit svg,
.elementor-search-form__submit svg path,
.elementor-search-form__submit svg circle,
.elementor-search-form__submit svg rect,
.elementor-search-form__submit svg line,
.elementor-search-form__submit svg polyline,
.elementor-search-form__submit svg polygon,
.elementor-search-form__submit svg ellipse,
.elementor-search-form__submit svg g,
.elementor-search-form__submit svg defs,
.elementor-search-form__submit svg use,
.elementor-search-form__submit svg symbol,
.elementor-search-form__submit svg marker,
.elementor-search-form__submit svg clipPath,
.elementor-search-form__submit svg mask {
    /* ปิดทุก SVG animations */
    animation: none !important;
    transition: none !important;
    transform: none !important;
    transform-origin: center !important;
    
    /* Vendor prefixes สำหรับ SVG */
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    
    /* SVG-specific properties */
    opacity: 1 !important;
    visibility: visible !important;
    clip-path: none !important;
    mask: none !important;
    filter: none !important;
    
    /* ป้องกัน CSS Variables ใน SVG */
    --svg-animation: none !important;
    --transform: none !important;
    --scale: 1 !important;
    --rotate: 0deg !important;
    --translate-x: 0 !important;
    --translate-y: 0 !important;
}

/* ป้องกัน CSS custom properties ที่อาจส่งผลต่อ SVG */
.elementor-search-form__submit {
    --elementor-icon-bounce: none !important;
    --bounce-animation: none !important;
    --icon-transform: none !important;
    --submit-animation: none !important;
    --button-scale: 1 !important;
    --icon-scale: 1 !important;
}

/* ป้องกัน inline styles ที่อาจถูกใส่ใน SVG */
.elementor-search-form__submit svg[style] {
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* ป้องกัน animateTransform ใน SVG */
.elementor-search-form__submit svg animateTransform,
.elementor-search-form__submit svg animate,
.elementor-search-form__submit svg animateMotion {
    display: none !important;
    animation-play-state: paused !important;
}

/* ป้องกัน CSS classes ที่อาจมีการเคลื่อนไหว */
.elementor-search-form__submit.bounce,
.elementor-search-form__submit.bouncing,
.elementor-search-form__submit.animated,
.elementor-search-form__submit.pulse,
.elementor-search-form__submit.shake,
.elementor-search-form__submit.wobble,
.elementor-search-form__submit.swing,
.elementor-search-form__submit.tada,
.elementor-search-form__submit.heartBeat {
    animation: none !important;
    transform: none !important;
    -webkit-animation: none !important;
    -webkit-transform: none !important;
}

/* === ป้องกันทุก animation ที่อาจมาจาก Elementor หรือ WordPress === */
.elementor-search-form__submit,
.elementor-search-form__submit *,
.elementor-search-form__submit svg,
.elementor-search-form__submit svg *,
.elementor-search-form__submit i,
.elementor-search-form__submit svg path,
.elementor-search-form__submit svg circle,
.elementor-search-form__submit svg rect,
.elementor-search-form__submit svg line,
.elementor-search-form__submit svg polyline,
.elementor-search-form__submit svg polygon,
.elementor-search-form__submit svg ellipse,
.elementor-search-form__submit svg g,
.elementor-search-form__submit svg defs,
.elementor-search-form__submit svg use,
.elementor-search-form__submit svg symbol {
    /* ล็อคทุก animation properties แบบสุดโต่ง */
    animation: none !important;
    transition: none !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    rotate: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    perspective: none !important;
    transform-style: flat !important;
    transform-origin: center !important;
    
    /* Vendor prefixes - ครบทุกตัว */
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    -o-animation: none !important;
    
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -o-transform: none !important;
    
    /* ล็อค CSS animation properties ทุกตัว */
    animation-name: none !important;
    animation-duration: 0s !important;
    animation-timing-function: linear !important;
    animation-delay: 0s !important;
    animation-iteration-count: 0 !important;
    animation-direction: normal !important;
    animation-fill-mode: none !important;
    animation-play-state: paused !important;
    
    /* ล็อค transition properties */
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-timing-function: linear !important;
    transition-delay: 0s !important;
    
    /* ป้องกัน CSS Variables ที่อาจใช้ใน animations */
    --animation: none !important;
    --transform: none !important;
    --bounce: none !important;
    --scale: 1 !important;
    --rotate: 0deg !important;
    --translate-x: 0 !important;
    --translate-y: 0 !important;
    --elementor-animation: none !important;
    --e-animation: none !important;
    --wp-animation: none !important;
}

/* ป้องกัน pseudo-elements - แก้ไขให้ไม่กระทบปุ่ม */
.elementor-search-form__submit *::before,
.elementor-search-form__submit *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    content: none !important;
    /* ลบ display: none เพื่อไม่ให้กระทบปุ่ม */
}

/* ป้องกัน hover, active, focus states */
.elementor-search-form__submit:hover,
.elementor-search-form__submit:active,
.elementor-search-form__submit:focus,
.elementor-search-form__submit:visited,
.elementor-search-form__submit:target,
.elementor-search-form__submit:hover *,
.elementor-search-form__submit:active *,
.elementor-search-form__submit:focus *,
.elementor-search-form__submit:visited *,
.elementor-search-form__submit:target * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    -webkit-animation: none !important;
    -webkit-transition: none !important;
    -webkit-transform: none !important;
    outline: none !important;
}

/* ล็อคตำแหน่งและขนาดแบบแน่นหนา - แก้ไขให้เหมาะสม */
.elementor-search-form__submit {
    position: absolute !important;
    top: -9px !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #007cba !important;
    border: none !important;
    z-index: 2 !important;
}

/* ล็อค SVG ขนาดและตำแหน่ง - แก้ไขให้เหมาะสม */
.elementor-search-form__submit svg {
    width: 19px !important;
    height: 19px !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ปิดการเคลื่อนไหวจาก external libraries */
.elementor-search-form__submit.wow,
.elementor-search-form__submit.aos-animate,
.elementor-search-form__submit[data-wow],
.elementor-search-form__submit[data-aos] {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override keyframes ที่อาจขัดแย้ง */
@keyframes bounce {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes shake {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes wobble {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes swing {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes tada {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes fadeIn {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes fadeOut {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes slideIn {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes slideOut {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes zoomIn {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

@keyframes zoomOut {
    0%, 100% {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* === บังคับให้ปุ่มค้นหาแสดงอย่างแน่นอน === */
/* .elementor-search-form__submit {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 50px !important;
    height: 50px !important;
    position: absolute !important;
    top: -9px !important;
    right: 0 !important;
    z-index: 999 !important;
    background: #007cba !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
} */

/* บังคับให้ icon ในปุ่มแสดง */
.elementor-search-form__submit svg,
.elementor-search-form__submit i {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 19px !important;
    height: 19px !important;
    /* fill: currentColor !important; */
}

/* บังคับให้ปุ่มแสดงใน hover state */
/* .elementor-search-form__submit:hover {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #005a87 !important;
} */

/* บังคับให้ปุ่มแสดงในทุก state */
.elementor-search-form__submit:active,
.elementor-search-form__submit:focus,
.elementor-search-form__submit:visited {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}