/**
 * Mobile Search Optimization Styles (Prom Style)
 */
.novateplica-mobile-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll Lock */
html.mobile-search-open,
body.mobile-search-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

.novateplica-mobile-search.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Header Section */
.mobile-search-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 60px;
    gap: 12px;
}

.mobile-search-back,
.mobile-search-settings-btn {
    background: none;
    border: none;
    padding: 10px;
    font-size: 18px;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-search-input-wrap {
    flex: 1;
    position: relative;
    background: #f4f4f4;
    border-radius: 10px;
    height: 40px;
    display: flex;
    align-items: center;
}

.mobile-search-input {
    width: 100%;
    border: none;
    background: transparent !important;
    padding: 0 15px;
    font-size: 15px;
    color: #333;
    outline: none;
    height: 100%;
}

.mobile-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    padding: 5px;
}

/* Results Area */
.mobile-search-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 50px;
}

.mobile-search-results {
    padding: 10px 0;
}

/* Settings Panel (Bottom Sheet) */
.mobile-search-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-search-settings-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 20;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
}

.novateplica-mobile-search.settings-active .mobile-search-settings-overlay {
    opacity: 1;
    visibility: visible;
}

.novateplica-mobile-search.settings-active .mobile-search-settings-panel {
    transform: translateY(0);
}

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f2f2f2;
}

.settings-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.close-settings {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
}

.settings-panel-content {
    padding: 20px;
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item.toggle-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.setting-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
}

.setting-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.4;
}

.settings-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

/* Custom Switch Toggle */
.novateplica-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.novateplica-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.novateplica-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .4s;
    border-radius: 34px;
}

.novateplica-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked+.novateplica-slider {
    background-color: #3bc54e;
    /* Mobile primary emerald green */
}

input:checked+.novateplica-slider:before {
    transform: translateX(22px);
}

/* View Options Buttons */
.view-options {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.view-opt-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.view-opt-btn.active {
    background: #f0f7f0;
    border-color: #3bc54e;
    color: #2b8c38;
}

.view-opt-btn i {
    font-size: 16px;
}

/* Results Customization for Mobile Overlay */
.novateplica-mobile-search .live-search-results-list li a {
    padding: 15px 20px;
}

.novateplica-mobile-search .live-search-results-list .result-image {
    width: 65px;
    height: 65px;
}

.novateplica-mobile-search .live-search-results-list .result-title {
    font-size: 15px;
    white-space: normal;
    /* Allow titles to wrap on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.novateplica-mobile-search .live-search-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.novateplica-mobile-search .no-results-found {
    padding: 80px 40px;
}

/* Scrollbar */
.scrollbar-custom::-webkit-scrollbar {
    width: 4px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}