/* Mobile Search Button */
.mobile-search-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c3073f;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-search-btn:hover {
    background: #f5f5f5;
    color: #c3073f;
}

.mobile-search-btn:active {
    transform: translateY(0);
}

/* Mobile Dashboard Button */
.mobile-dashboard-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c3073f;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-dashboard-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(195, 7, 63, 0.1), transparent);
    transition: left 0.5s;
}

.mobile-dashboard-btn:hover::before {
    left: 100%;
}

.mobile-dashboard-btn:hover {
    background: #c3073f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195, 7, 63, 0.3);
}

.mobile-dashboard-btn:active {
    transform: translateY(0);
}

/* Mobile Search Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-search-modal.active {
    display: flex;
    opacity: 1;
}

.mobile-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mobile-search-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.mobile-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 8px 8px 20px;
    border-bottom: 1px solid #ebebeb;
    background: #fff;
    color: #111827;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-search-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111827;
}

.mobile-search-close {
    background: transparent;
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-search-close:hover {
    background: #f5f5f5;
}

.mobile-search-content {
    padding: 16px 20px 20px;
}

.mobile-search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.mobile-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 2;
}

.mobile-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    font-size: 16px;
    background: #fafafa;
    color: #111827;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.mobile-search-input-wrapper:has(.mobile-search-clear[style*="display: block"]) .mobile-search-input {
    padding-right: 40px;
}

.mobile-search-input:focus {
    border-color: #c3073f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(195, 7, 63, 0.12);
}

.mobile-search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-search-clear:hover {
    background: #f0f0f0;
    color: #666;
}

.mobile-search-suggestions {
    margin-bottom: 20px;
}

.suggestion-category {
    margin-bottom: 15px;
}

.suggestion-category h4 {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-tag {
    background: #fff;
    color: #111827;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 1px solid #ebebeb;
}

.suggestion-tag:hover {
    background: #fafafa;
    border-color: #d1d5db;
}

/* Autocomplete Results */
.mobile-search-results {
    margin-top: 12px;
    margin-bottom: 15px;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ebebeb;
}

.mobile-search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
}

.mobile-search-result-item:last-child {
    border-bottom: none;
}

.mobile-search-result-item:hover {
    background: #f8f9fa;
}

.mobile-search-result-item.active {
    background: #fafafa;
}

.mobile-search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.mobile-search-result-content {
    flex: 1;
    min-width: 0;
}

.mobile-search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-search-result-meta {
    font-size: 12px;
    color: #999;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-search-result-item:hover .mobile-search-result-title {
    color: #c3073f;
}

.mobile-search-results-empty {
    padding: 30px 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.mobile-search-results-loading {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.mobile-search-submit {
    width: 100%;
    background: #c3073f;
    color: #fff;
    border: 1px solid #c3073f;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-search-submit:hover {
    background: #a00635;
    border-color: #a00635;
}

@media (max-width: 480px) {
    .mobile-search-modal {
        padding-top: 10vh;
    }
}
