/**
 * 美大客服支持中心 - 补充样式
 */

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* 确保文本可以被缩放 */
html {
    -webkit-text-size-adjust: none;
}

/* 搜索框样式优化 */
.search-input {
    font-size: 16px; /* 防止iOS缩放 */
    transition: all 0.2s ease;
}

.search-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 搜索图标大小修复 */
.search-icon {
    width: 20px !important;
    height: 20px !important;
    color: #9CA3AF;
}

/* 日期选择器样式 */
.date-picker-wrapper {
    position: relative;
}

.date-picker-wrapper input[type="date"] {
    position: relative;
    z-index: 1;
    background: transparent;
    color: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
}

.date-picker-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 当有日期值时，显示日历图标 */
.date-picker-wrapper input[type="date"]:not([value=""])::-webkit-calendar-picker-indicator {
    opacity: 0.6;
}

.date-picker-wrapper input[type="date"]:not([value=""]):hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.date-picker-overlay {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    z-index: 2;
}

.date-picker-overlay:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

.date-picker-overlay:active {
    transform: translateY(0);
}

/* 点击层样式 */
.date-click-layer {
    background: transparent;
    border: none;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-click-layer:hover {
    background: rgba(59, 130, 246, 0.02);
}

.date-click-layer.border-red-500 {
    border: 1px solid #EF4444;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.02);
}

.date-picker-wrapper input[type="date"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
    transform: translateY(-1px);
}

.date-picker-wrapper input[type="date"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
}

/* 错误状态样式 */
.date-picker-wrapper input[type="date"].border-red-500 {
    border-color: #EF4444 !important;
    background: linear-gradient(135deg, #FEF2F2 0%, #FFFFFF 100%) !important;
}

.date-picker-wrapper .date-picker-overlay.border-red-500 {
    border-color: #EF4444;
    background: linear-gradient(135deg, #FEF2F2 0%, #FFFFFF 100%);
}

.date-picker-wrapper .date-picker-overlay.border-red-500:hover {
    border-color: #DC2626;
}

/* 日期显示文本样式 */
#date-display {
    font-weight: 500;
    transition: color 0.2s ease;
    pointer-events: none;
}

#date-display.text-gray-900 {
    color: #111827 !important;
}

/* 图标容器样式 */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #EBF8FF 0%, #BEE3F8 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Emoji 图标优化 */
.emoji-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-style: normal;
    font-variant: normal;
    font-weight: normal;
    line-height: 1;
    font-size: 1.5rem;
}

/* 产品卡片样式增强 */
.product-card {
    min-height: 5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #3B82F6;
}

.product-card:active {
    transform: translateY(-2px);
}

/* 问题卡片样式 */
.issue-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
}

.issue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #3B82F6;
}

/* 按钮样式优化 */
button, .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* 表单输入框样式优化 */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6;
    transform: translateY(-1px);
}

/* 特殊处理日期选择器的focus样式 */
.date-picker-wrapper:focus-within input[type="date"] {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    border-color: #3B82F6 !important;
}

/* 导航栏优化 */
nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* 页面标题样式 */
h1 {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 响应式调整 */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .p-6 {
        padding: 1rem;
    }
    
    /* 小屏幕下的产品卡片 */
    .product-card {
        min-height: 4rem;
        padding: 1rem;
    }
    
    /* 小屏幕下的图标容器 */
    .icon-container {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .emoji-icon {
        font-size: 1.25rem;
    }
    
    /* 小屏幕下的日期选择器 */
    .date-picker-card {
        padding: 0.75rem 1rem;
    }
    
    #date-display {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        text-align: center;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 1rem;
    }
    
    .product-card .icon-container {
        margin-bottom: 0.5rem;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .emoji-icon {
        font-size: 1.1em;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card, .issue-card {
    animation: fadeIn 0.6s ease-out;
}

/* 无搜索结果提示 */
.no-results {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: #6B7280;
    font-style: italic;
}

.no-results.show {
    display: block;
}

/* 可访问性改进 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 焦点可见性改进 */
*:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* 确保图标在所有设备上都能正确显示 */
.icon-fallback {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #EBF8FF 0%, #BEE3F8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
} 