/**
 * FEB Cloud - Modern UI Overrides
 * Larger rounded corners, modern design
 */

:root {
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);
}

/* ===== Cards - Modern rounded corners ===== */
.card, .mc-promo-manage, .mc-promo-login {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.card:hover, .card.mb-3:hover {
  box-shadow: var(--shadow-md);
}
.card > .card-header:first-child,
.card > .list-group:first-child .list-group-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}
.card > .card-footer:last-child,
.card > .list-group:last-child .list-group-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}
.card-columns.home .card {
  border-radius: var(--radius-lg) !important;
}

/* ===== Home Domain Search Section ===== */
.home-domain-search {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.home-domain-search .input-group-wrapper {
  border-radius: 18px !important;
  border: 1px solid #e2e8f0;
  padding: 8px;
  background: #f8fafc;
}
.home-domain-search .input-group-wrapper .form-control {
  border: none !important;
  border-radius: 12px 0 0 12px !important;
}
.home-domain-search .input-group-wrapper .input-group-append .btn {
  border-radius: 0 !important;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
}
.home-domain-search .input-group-wrapper .input-group-append .btn:last-child {
  border-radius: 0 12px 12px 0 !important;
}

/* ===== Buttons ===== */
.btn {
  border-radius: var(--radius-md) !important;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-primary, .btn-success {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover, .btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-outline-primary {
  border-width: 2px;
}
.btn-outline-primary:hover {
  transform: translateY(-1px);
}
.btn-lg {
  border-radius: var(--radius-lg) !important;
  padding: 0.6rem 1.5rem;
}
.btn-sm {
  border-radius: var(--radius-sm) !important;
}

/* ===== Form Controls ===== */
.form-control {
  border-radius: var(--radius-md) !important;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 1rem;
}
.form-control:focus {
  border-color: var(--primary, #336699);
  box-shadow: 0 0 0 3px rgba(51, 102, 153, 0.15);
}

/* ===== Action Icon Buttons (How can we help / Your Account) ===== */
.action-icon-btns a {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}
.action-icon-btns a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Knowledge Base Search (header) ===== */
header.header .kb-search-wrapper {
  border-radius: 18px !important;
  border: 1px solid #e2e8f0;
  padding: 6px;
  background: #f8fafc;
  overflow: hidden;
}
header.header .kb-search-wrapper:focus-within {
  border-color: var(--primary, #336699) !important;
  box-shadow: 0 0 0 2px rgba(51, 102, 153, 0.2);
}
header.header .kb-search-wrapper .input-group.search {
  border: none !important;
  border-radius: 12px !important;
  background: transparent;
}
header.header .kb-search-wrapper .input-group.search .input-group-prepend .btn {
  border-radius: 12px 0 0 12px !important;
  border: none !important;
  background: transparent;
}
header.header .kb-search-wrapper .input-group.search .form-control {
  border-radius: 0 12px 12px 0 !important;
  border: none !important;
  background: transparent;
}
header.header .kb-search-wrapper .input-group.search .form-control:focus {
  box-shadow: none !important;
}

/* ===== Header / Navbar ===== */
.header .navbar {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.navbar-brand .logo-img {
  border-radius: var(--radius-md);
}
.topbar {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ===== Mobile: Logo no rounded corners, fix header/sidebar/dropdown ===== */
@media (max-width: 991px) {
  .navbar-brand .logo-img {
    border-radius: 0 !important;
  }
  .header .navbar {
    border-radius: 0 !important;
  }
  .topbar {
    border-radius: 0 !important;
  }
  /* Sidebar cards (账户详情 etc) - reduce rounded corners to avoid overlap issues */
  .sidebar .card,
  .sidebar .card .card-header {
    border-radius: 8px !important;
  }
  .sidebar .card .card-header:first-child {
    border-radius: 8px 8px 0 0 !important;
  }
  .sidebar .card.d-block.d-md-none {
    border-radius: 8px !important;
  }
  /* DataTables "Show entries" dropdown - fix pill-shaped style */
  .dataTables_wrapper .dataTables_length select,
  .dataTables_wrapper .dataTables_length label select {
    border-radius: 6px !important;
    padding: 0.35rem 2rem 0.35rem 0.75rem;
    min-height: 38px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
  }
  /* Sidebar mobile select dropdown */
  .sidebar .card.d-block.d-md-none .form-control,
  .sidebar .card.d-block.d-md-none select.form-control {
    border-radius: 6px !important;
  }
  /* Primary content cards - reduce rounded corners for consistency below header */
  .primary-content .card,
  .primary-content .card .card-header {
    border-radius: 8px !important;
  }
  .primary-content .card .card-header:first-child {
    border-radius: 8px 8px 0 0 !important;
  }
  .primary-content .card > .card-footer:last-child,
  .primary-content .card > .list-group:last-child .list-group-item:last-child {
    border-radius: 0 0 8px 8px !important;
  }
}

/* ===== Input Groups ===== */
.input-group .form-control {
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
}
.input-group .input-group-append .btn,
.input-group .input-group-prepend .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}
.input-group .input-group-append .btn:first-child,
.input-group .input-group-prepend .btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
}
.breadcrumb-item + .breadcrumb-item::before {
  opacity: 0.5;
}

/* ===== Panels / Sections ===== */
.panel,
.panel-default {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-heading {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* ===== Modals ===== */
.modal-content {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg);
  border: none;
}
.modal-header {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ===== Alerts ===== */
.alert {
  border-radius: var(--radius-md) !important;
  border: none;
}

/* ===== Dropdowns ===== */
.dropdown-menu {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}

/* ===== Footer ===== */
footer .container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ===== TLD logos section ===== */
.home-domain-search .tld-logos {
  padding: 1rem 0;
}
.home-domain-search .tld-logos li {
  background: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ===== Headings spacing ===== */
h2.text-center.m-4 {
  margin-top: 2.5rem !important;
  margin-bottom: 1.5rem !important;
  font-weight: 600;
}

/* ===== Hero / Featured Product Carousel ===== */
.home-hero-carousel {
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.home-hero-carousel .carousel-inner,
.home-hero-carousel .carousel-item {
  border-radius: var(--radius-xl);
}
.hero-banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.hero-banner-inner {
  padding: 3rem 2rem;
  min-height: 320px;
}
.hero-banner-blue {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #3d7ab5 100%);
}
.hero-banner-teal {
  background: linear-gradient(135deg, #0d4f4f 0%, #1a7a7a 50%, #259896 100%);
}
.hero-banner-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.hero-banner-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.hero-banner-desc {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.hero-banner-img img {
  border-radius: var(--radius-lg);
  max-height: 280px;
  object-fit: cover;
}
@media (max-width: 991px) {
  .hero-banner-inner { min-height: 260px; padding: 2rem; }
  .hero-banner-title { font-size: 1.5rem; }
}

/* ===== Customer Reviews Carousel ===== */
.customer-reviews-carousel {
  overflow: hidden;
  margin: 0 -15px;
}
.reviews-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  animation: scroll-reviews 50s linear infinite;
  width: max-content;
}
.reviews-track-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1.5rem;
  flex: 0 0 auto;
}
.review-card {
  flex: 0 0 340px;
  min-width: 320px;
  flex-shrink: 0;
}

/* ===== Partners Logos (multi-row grid with names) ===== */
.partners-logos {
  margin: 0 auto;
}
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem 2.5rem;
}
.partner-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-width: 90px;
  max-width: 110px;
  padding: 0.75rem;
  border-radius: 8px;
  transition: opacity 0.3s, transform 0.2s, background-color 0.2s;
}
.partner-card:hover {
  opacity: 1;
  transform: translateY(-2px);
  background-color: rgba(0, 0, 0, 0.03);
  color: inherit;
}
.partner-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}
.partner-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #495057;
  line-height: 1.2;
  word-break: break-word;
}
.partner-card:hover .partner-name {
  color: #212529;
}

@keyframes scroll-reviews {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Featured Carousel Controls ===== */
.home-hero-carousel .carousel-control-prev,
.home-hero-carousel .carousel-control-next {
  width: 48px;
  opacity: 0.9;
}
.home-hero-carousel .carousel-indicators {
  bottom: 1rem;
}
.home-hero-carousel .carousel-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ===== Promotions Section ===== */
.promotion-card {
  border-radius: var(--radius-xl) !important;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease;
}
.promotion-card:hover {
  box-shadow: var(--shadow-md);
}
.promotion-migration {
  border-left: 4px solid var(--primary, #336699);
}
.promotion-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.promotion-desc {
  line-height: 1.6;
}

/* ===== WhatsApp 悬浮联系按钮 ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  color: #fff !important;
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}
.whatsapp-float i {
  font-size: 28px;
}
