/**
 * STIFF BEAST™ Customer Service Component Styles
 * 客服组件样式 - 精美现代的客服浮窗
 * 2025-11-07
 */

:root {
    --primary-black: #000000;
    --primary-red: #D40000;
    --primary-gold: #FFD700;
    --primary-white: #FFFFFF;
    --primary-orange: #FF4500;
}

/* ============ 客服容器 ============ */
.customer-service-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============ 浮动按钮样式 ============ */
.floating-service-btn {
    position: relative;
    width: 70px;
    height: 85px;
    background: var(--primary-gold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    animation: float-service 3s ease-in-out infinite;
    padding: 0;
    flex-direction: column;
}

@keyframes float-service {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.floating-service-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.8);
}

.floating-service-btn.active {
    animation: none;
    transform: scale(1);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.8);
}

.floating-service-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 4px;
}

.floating-service-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.9);
    flex-shrink: 0;
}

.floating-service-text {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
    color: rgba(0, 0, 0, 0.85);
}

/* 服务徽章（新消息提示） */
.service-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-red);
    color: var(--primary-white);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 0, 0, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(212, 0, 0, 0);
    }
}

/* 按钮提示文字 */
.service-tooltip {
    position: absolute;
    bottom: 85px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: var(--primary-white);
    padding: 12px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

.floating-service-btn:hover .service-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 90px;
}

/* ============ 服务面板样式 ============ */
.customer-service-panel {
    position: fixed;
    bottom: 130px;
    right: 30px;
    width: 380px;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.1);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    max-height: 600px;
    overflow-y: auto;
    z-index: 1000;
}

.customer-service-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 面板头部 */
.service-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(212, 0, 0, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.service-header-content {
    flex: 1;
}

.service-panel-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-panel-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.service-online-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

/* 关闭按钮 */
.service-panel-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.service-panel-close:hover {
    color: var(--primary-gold);
    transform: rotate(90deg);
}

/* 面板主体 */
.service-panel-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-panel-message {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ============ 联系方式部分 ============ */
.service-contact-section {
    padding: 15px;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.service-contact-title {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-contact-btn:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.15) 100%);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    transform: translateX(5px);
}

.service-contact-btn svg {
    flex-shrink: 0;
}

.service-btn-email:hover {
    color: #4db8ff;
    border-color: #4db8ff;
    background: linear-gradient(135deg, rgba(77, 184, 255, 0.1) 0%, rgba(77, 184, 255, 0.05) 100%);
}

.service-btn-whatsapp:hover {
    color: #25d366;
    border-color: #25d366;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1) 0%, rgba(37, 211, 102, 0.05) 100%);
}

.service-btn-wechat:hover {
    color: #09b83e;
    border-color: #09b83e;
    background: linear-gradient(135deg, rgba(9, 184, 62, 0.1) 0%, rgba(9, 184, 62, 0.05) 100%);
}

/* ============ 快速回复部分 ============ */
.service-quick-reply {
    padding: 15px;
    background: rgba(212, 0, 0, 0.05);
    border: 1px solid rgba(212, 0, 0, 0.1);
}

.service-quick-title {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-message-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--primary-white);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.service-message-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.service-message-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.service-send-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-gold);
    border: none;
    color: var(--primary-black);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.service-send-btn:active {
    transform: translateY(0);
}

/* ============ 响应式设计 ============ */
@media (max-width: 768px) {
    .customer-service-container {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-service-btn {
        width: 60px;
        height: 60px;
    }
    
    .floating-service-icon {
        font-size: 1.8rem;
        width: 100%;
        height: 100%;
    }
    
    /* 隐藏移动端的文字 */
    .floating-service-text {
        display: none;
    }
    
    /* 隐藏移动端的悬浮提示框 */
    .service-tooltip {
        display: none !important;
    }
    
    .service-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .customer-service-panel {
        width: calc(100vw - 40px);
        max-width: 380px;
        bottom: auto;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, calc(-50% + 20px)) scale(0.95);
    }
    
    .customer-service-panel.active {
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 480px) {
    .floating-service-btn {
        width: 56px;
        height: 56px;
    }
    
    .floating-service-icon {
        font-size: 1.6rem;
        width: 100%;
        height: 100%;
    }
    
    /* 小屏手机端也隐藏文字 */
    .floating-service-text {
        display: none;
    }
    
    .customer-service-panel {
        width: calc(100vw - 30px);
    }
    
    .service-panel-title {
        font-size: 1.1rem;
    }
    
    .service-panel-body {
        gap: 12px;
    }
    
    .service-contact-buttons {
        gap: 6px;
    }
    
    .service-contact-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* ============ 滚动条样式 ============ */
.customer-service-panel::-webkit-scrollbar {
    width: 6px;
}

.customer-service-panel::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.05);
}

.customer-service-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
}

.customer-service-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Firefox 滚动条 */
.customer-service-panel {
    scrollbar-color: rgba(255, 215, 0, 0.3) rgba(255, 215, 0, 0.05);
    scrollbar-width: thin;
}

/* ============ 打印样式 ============ */
@media print {
    .customer-service-container {
        display: none;
    }
}

/* ============ 深色模式支持 ============ */
@media (prefers-color-scheme: dark) {
    .customer-service-panel {
        background: rgba(15, 15, 15, 0.98);
    }
}

/* ============ 动画优化 ============ */
@media (prefers-reduced-motion: reduce) {
    .floating-service-btn,
    .floating-service-btn .service-tooltip,
    .customer-service-panel,
    .service-contact-btn,
    .service-send-btn {
        animation: none !important;
        transition: none !important;
    }
}

.fade-in {
  animation: fadeIn ease 1s;
  -webkit-animation: fadeIn ease 1s;
  -moz-animation: fadeIn ease 1s;
  -o-animation: fadeIn ease 1s;
  -ms-animation: fadeIn ease 1s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-moz-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-o-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-ms-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

