/* Mobile Bottom Menu - Search Modal Styles */

.mbm-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mbm-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.mbm-search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.mbm-search-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mbm-search-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.mbm-search-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.mbm-search-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.mbm-search-container {
    padding: 20px;
    max-width: 800px;
    width: 100%;
    margin: 60px auto 20px;
}

.mbm-search-form {
    margin-bottom: 30px;
}

.mbm-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

.mbm-search-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #666;
    margin-right: 10px;
    flex-shrink: 0;
}

.mbm-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 18px;
    outline: none;
    padding: 0;
    color: #333;
}

.mbm-search-input::placeholder {
    color: #999;
}

.mbm-search-clear {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mbm-search-clear:hover {
    background: rgba(0, 0, 0, 0.15);
}

.mbm-search-clear .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mbm-search-submit {
    width: 100%;
    padding: 15px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mbm-search-submit:hover {
    background: #005a87;
}

.mbm-search-suggestions {
    margin-top: 20px;
}

.mbm-search-recent,
.mbm-search-tags {
    margin-bottom: 30px;
}

.mbm-search-recent h3,
.mbm-search-tags h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

.mbm-search-recent ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mbm-search-recent li {
    margin-bottom: 12px;
}

.mbm-search-recent a {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.mbm-search-recent a:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.mbm-search-recent a .dashicons {
    margin-right: 12px;
    color: #999;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mbm-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mbm-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.mbm-tag:hover {
    background: #0073aa;
    color: white;
    transform: translateY(-2px);
}

.mbm-search-results {
    margin-top: 20px;
}

.mbm-search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.mbm-search-no-results {
    text-align: center;
    padding: 40px 20px;
}

.mbm-search-no-results .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.mbm-search-no-results h3 {
    color: #666;
    margin-bottom: 10px;
}

.mbm-search-no-results p {
    color: #999;
}

/* Animation for modal opening */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.mbm-search-modal.active .mbm-search-modal-content {
    animation: slideInUp 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mbm-search-container {
        padding: 15px;
        margin-top: 50px;
    }
    
    .mbm-search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (min-width: 769px) {
    .mbm-search-modal-content {
        max-width: 800px;
        margin: 0 auto;
        border-radius: 0;
    }
    
    .mbm-search-container {
        margin-top: 80px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mbm-search-modal-content {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .mbm-search-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
    
    .mbm-search-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .mbm-search-input-wrapper {
        background: #2a2a2a;
    }
    
    .mbm-search-input {
        color: #ffffff;
    }
    
    .mbm-search-input::placeholder {
        color: #666;
    }
    
    .mbm-search-recent a {
        background: #2a2a2a;
        color: #ffffff;
    }
    
    .mbm-search-recent a:hover {
        background: #333;
    }
    
    .mbm-tag {
        background: #2a2a2a;
        color: #ccc;
    }
    
    .mbm-tag:hover {
        background: #0073aa;
        color: white;
    }
}
