/* 中国联通网上营业厅 - 公共组件样式 */

/* 头部导航 */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  border-bottom: 2px solid var(--primary-red);
  box-shadow: 0 2px 10px rgba(213, 0, 54, 0.08);
  margin: 0;
  padding: 0;
  border-top: none;
  border-left: none;
  border-right: none;
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-item {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-dark);
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item:hover {
  color: var(--primary-red);
  background-color: rgba(213, 0, 54, 0.08);
  transform: translateY(-3px);
}

.nav-item.active {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-red) 0%, #FF1744 100%);
  box-shadow: 0 4px 15px rgba(213, 0, 54, 0.3);
}

.nav-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: #E5E5E5;
}

.nav-item:last-child::after {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-dark);
  font-size: 14px;
}

.mobile-menu-btn {
  display: none;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu .container {
  padding: 16px 20px;
}

.mobile-menu .nav-item {
  display: block;
  padding: 12px 16px;
  color: var(--gray-dark);
  font-size: 16px;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.mobile-menu .nav-item:hover {
  background-color: rgba(213, 0, 54, 0.08);
  color: var(--primary-red);
}

.mobile-menu .nav-item.active {
  background: linear-gradient(135deg, var(--primary-red) 0%, #FF1744 100%);
  color: var(--white);
}

.mobile-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  margin-top: 8px;
  background: linear-gradient(135deg, rgba(213, 0, 54, 0.1) 0%, rgba(213, 0, 54, 0.05) 100%);
  border-radius: 8px;
}

.mobile-phone div:first-child {
  font-size: 12px;
  color: var(--gray-medium);
}

.mobile-phone div:last-child {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-red);
}

/* 页脚 */
.footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

.footer-content {
  padding: 40px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.footer-section h3 {
  font-size: 16px;
  font-weight: bold;
  color: var(--gray-dark);
  margin-bottom: 16px;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--gray-medium);
  font-size: 14px;
}

.footer-section ul li a:hover {
  color: var(--primary-red);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  font-size: 12px;
  color: var(--gray-light);
}

/* 悬浮工具栏 */
.floating-bar {
  position: fixed;
  right: 20px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.floating-item {
  width: 44px;
  height: 44px;
  background-color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: var(--transition);
  font-size: 20px;
}

.floating-item:hover {
  background-color: var(--primary-red);
  color: var(--white);
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
  padding: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-red) 0%, #FF1744 100%);
  position: sticky;
  top: 0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: bold;
  color: white;
  margin: 0;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 20px 24px 24px;
}

/* 表单样式 */
.form-row {
  margin-bottom: 16px;
}

.form-row-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row-half {
  flex: 1;
}

.form-row label,
.form-row-half label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-dark);
  margin-bottom: 6px;
}

.form-icon {
  margin-right: 4px;
}

.form-row input,
.form-row select,
.form-row textarea,
.form-row-half input,
.form-row-half select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: var(--white);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.form-row-half input:focus,
.form-row-half select:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(213, 0, 54, 0.1);
}

.form-row textarea {
  resize: none;
  min-height: 70px;
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-red) 0%, #FF1744 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(213, 0, 54, 0.3);
  margin-top: 8px;
}

.btn-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(213, 0, 54, 0.4);
}

@media (max-width: 768px) {
  .modal-overlay {
    padding: 12px;
  }
  
  .modal {
    max-width: 100%;
    border-radius: 12px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-header h3 {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 16px 20px 20px;
  }
  
  .form-row-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-row,
  .form-row-row {
    margin-bottom: 14px;
  }
}

/* 成功提示 */
.success-message {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background-color: #E8F5E9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #4CAF50;
  font-size: 32px;
}

/* 表单样式 */
.contact-form {
  background: var(--gray-lighter);
  padding: 24px;
  border-radius: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.contact-form textarea {
  resize: none;
  height: 100px;
}

/* 联系信息项 */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.contact-info-item:nth-child(1) .contact-icon {
  background: var(--primary-red);
}

.contact-info-item:nth-child(2) .contact-icon {
  background: var(--primary-blue);
}

.contact-info-item:nth-child(3) .contact-icon {
  background: #4CAF50;
}

.contact-info-item h4 {
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--gray-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-info-item p {
  color: var(--gray-medium);
  font-size: 14px;
}

.contact-phone {
  font-size: 24px !important;
  font-weight: bold;
  color: var(--primary-red) !important;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-wrapper {
    height: 60px;
  }

  .logo-img {
    height: 36px;
  }

  .header-nav {
    display: none;
  }

  .header-actions .phone-number span {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-content {
    padding: 24px 0;
  }

  .floating-bar {
    right: 12px;
    bottom: 80px;
  }
}