/* 移动端查询表单优化样式 */

/* 移动端优先查询区域 */
.mobile-priority-search {
    position: sticky;
    top: 80px;
    z-index: 100;
    margin-bottom: 2rem;
}

.mobile-priority-search .card {
    border-radius: 15px;
    overflow: hidden;
}

.mobile-priority-search .card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.mobile-priority-search .card-header.bg-gradient-success {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

/* 移动端表单容器 */
.mobile-form-wrapper {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #007bff;
}

.mobile-form-wrapper:hover {
    box-shadow: 0 4px 15px rgba(0,123,255,0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* 移动端搜索表单 */
.mobile-search-form .form-group {
    margin-bottom: 1rem;
}

.mobile-search-form .form-control {
    font-size: 16px; /* 防止iOS缩放 */
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.mobile-search-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.mobile-search-form .btn {
    font-size: 16px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.mobile-search-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 移动端特定优化 */
@media (max-width: 768px) {
    .mobile-priority-search {
        position: static;
        margin: 1rem -15px 2rem -15px;
    }
    
    .mobile-priority-search .card {
        border-radius: 0;
        margin: 0;
    }
    
    .mobile-priority-search .card-body {
        padding: 1.5rem 1rem;
    }
    
    .mobile-form-wrapper {
        margin: 0 0 1.5rem 0;
        border-radius: 8px;
        border-left: 3px solid #007bff;
    }
    
    .mobile-search-form .btn {
        width: 100%;
        padding: 1rem;
        font-size: 18px;
        margin-top: 0.5rem;
    }
    
    /* 查询框在移动端更突出 */
    .mobile-search-form .form-control {
        font-size: 18px;
        padding: 1rem;
        border-width: 3px;
        margin-bottom: 1rem;
    }
    
    .mobile-search-form .form-control:focus {
        box-shadow: 0 0 0 0.3rem rgba(0,123,255,0.3);
    }
}

/* 超小屏幕优化 */
@media (max-width: 576px) {
    .mobile-priority-search .card-header {
        padding: 1rem;
    }
    
    .mobile-priority-search .card-header h4 {
        font-size: 1.2rem;
    }
    
    .mobile-priority-search .card-header small {
        font-size: 0.8rem;
    }
    
    .mobile-form-wrapper {
        padding: 1rem;
    }
    
    .mobile-form-wrapper h6 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* 查询结果在移动端的优化 */
@media (max-width: 768px) {
    /* 隐藏桌面版查询区域 */
    .row.d-none {
        display: none !important;
    }
    
    /* 确保查询表单在移动端始终可见且突出 */
    .mobile-priority-search {
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    /* 表单输入提示更明显 */
    .mobile-search-form .text-muted {
        color: #6c757d !important;
        font-size: 0.9rem;
        background: #e9ecef;
        padding: 0.5rem;
        border-radius: 5px;
        margin-top: 0.5rem;
    }
}

/* 触摸友好的交互效果 */
.mobile-search-form .btn:active {
    transform: scale(0.98);
}

.mobile-form-wrapper:active {
    transform: none;
}

/* 加载状态 */
.mobile-search-form .btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.mobile-search-form .btn.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 成功状态样式 */
.mobile-form-wrapper.success {
    border-left-color: #007bff;  /* 改为蓝色，避免绿色 */
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.mobile-form-wrapper.warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fffef8 0%, #fff3cd 100%);
}
