/* ==========================================================================
   DAYNEX MOBILE & DESKTOP FAST SERVICE NAVIGATOR & APP-GRADE EXPERIENCE
   Optimized for mobile thumb-reach, instant service discovery & conversion.
   ========================================================================== */

/* ------------------------------------------------------------------------
   1. BASE FINDER TABS & SERVICE SEARCH PANEL (DESKTOP & MOBILE)
   ------------------------------------------------------------------------ */
.dx-finder-tabs {
  display: flex;
  background: #eef4fb;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
  max-width: 100%;
}

.dx-finder-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #486581;
  background: none;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
}

.dx-finder-tab:hover {
  color: #0b57d0;
}

.dx-finder-tab.active {
  background: #ffffff;
  color: #0b57d0;
  box-shadow: 0 2px 10px rgba(11, 87, 208, 0.12);
  font-weight: 700;
}

/* Service Search Panel */
.dx-service-search-panel {
  margin-bottom: 16px;
  animation: dxFadeIn 0.2s ease;
}

@keyframes dxFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dx-service-search-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.dx-service-search-input-wrap input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  font-size: 14px;
  border: 1.5px solid #0b57d0;
  border-radius: 12px;
  color: #173f61;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230b57d0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 14px center;
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(11, 87, 208, 0.08);
}

.dx-service-search-input-wrap input:focus {
  border-color: #0077ff;
  box-shadow: 0 0 0 4px rgba(11, 87, 208, 0.15);
}

.dx-service-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dx-service-pills::-webkit-scrollbar {
  display: none;
}

.dx-service-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334e68;
  border: 1px solid #d9e2ec;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.dx-service-pill:hover {
  background: #e2e8f0;
  color: #102a43;
}

.dx-service-pill.active {
  background: #0b57d0;
  color: #ffffff;
  border-color: #0b57d0;
}

.dx-service-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.dx-service-result-item {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e1eaf2;
  border-radius: 10px;
  text-decoration: none;
  color: #173f61;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.dx-service-result-item:hover,
.dx-service-result-item:active {
  border-color: #0b57d0;
  background: #f8fbff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(11, 87, 208, 0.1);
}

.dx-service-result-item strong {
  font-size: 12px;
  font-weight: 700;
  color: #102a43;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dx-service-result-item strong span {
  color: #0b57d0;
  font-size: 12px;
}

.dx-service-result-item small {
  font-size: 10px;
  color: #627d98;
  margin-top: 3px;
  line-height: 1.3;
}

/* ------------------------------------------------------------------------
   2. QUICK SERVICE SHORTCUT GRID (8 HIGH-CONVERSION CARDS)
   ------------------------------------------------------------------------ */
.dx-mobile-quick-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin: 18px 0 14px;
  width: 100%;
}

.dx-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 6px;
  background: #ffffff;
  border: 1px solid #e4ecf3;
  border-radius: 12px;
  text-decoration: none;
  color: #173f61;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.dx-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 87, 208, 0.1);
  border-color: #0b57d0;
}

.dx-quick-card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dx-quick-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 17px;
  position: relative;
}

.dx-quick-card.domain .dx-quick-icon-wrap { background: #e0f2fe; color: #0284c7; }
.dx-quick-card.hosting .dx-quick-icon-wrap { background: #fef3c7; color: #d97706; }
.dx-quick-card.server .dx-quick-icon-wrap { background: #dbeafe; color: #2563eb; }
.dx-quick-card.ecommerce .dx-quick-icon-wrap { background: #dcfce7; color: #16a34a; }
.dx-quick-card.b2b .dx-quick-icon-wrap { background: #fae8ff; color: #9333ea; }
.dx-quick-card.corporate .dx-quick-icon-wrap { background: #e0e7ff; color: #4f46e5; }
.dx-quick-card.ssl .dx-quick-icon-wrap { background: #fee2e2; color: #dc2626; }
.dx-quick-card.support .dx-quick-icon-wrap { background: #ccfbf1; color: #0d9488; }

.dx-quick-card strong {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
  display: block;
}

.dx-quick-card small {
  font-size: 9px;
  color: #64748b;
  margin-top: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.dx-quick-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 6px;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

/* ------------------------------------------------------------------------
   3. DESKTOP SPECIFIC RULES
   ------------------------------------------------------------------------ */
@media (min-width: 801px) {
  .dx-mobile-bottom-bar,
  .dx-mobile-sheet-overlay {
    display: none !important;
  }
}

/* ------------------------------------------------------------------------
   4. MOBILE SPECIFIC RULES (MAX-WIDTH: 800PX)
   ------------------------------------------------------------------------ */
@media (max-width: 800px) {
  /* Prevent bottom bar from overlapping page content */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* 4 columns in mobile quick grid */
  .dx-mobile-quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0 10px;
  }

  .dx-quick-card {
    padding: 10px 4px;
  }

  .dx-quick-icon-wrap {
    width: 32px;
    height: 32px;
    font-size: 15px;
    margin-bottom: 4px;
  }

  .dx-quick-card strong {
    font-size: 10px;
  }

  .dx-quick-card small {
    font-size: 8.5px;
  }

  /* Sticky Mobile Bottom Bar */
  .dx-mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 5px 6px env(safe-area-inset-bottom, 6px) 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(23, 63, 97, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 20, 40, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 99990;
    box-sizing: border-box;
  }

  .dx-mb-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    border: none;
    outline: none;
    color: #4b6478;
    padding: 3px 2px;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dx-mb-item:active {
    transform: scale(0.92);
  }

  .dx-mb-item.active,
  .dx-mb-item:hover {
    color: #0b57d0;
  }

  .dx-mb-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2px;
  }

  .dx-mb-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dx-mb-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.2px;
  }

  /* Center Highlight Button */
  .dx-mb-item.dx-mb-highlight {
    color: #ffffff;
  }

  .dx-mb-item.dx-mb-highlight .dx-mb-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b57d0, #0077ff);
    box-shadow: 0 4px 14px rgba(11, 87, 208, 0.4);
    margin-top: -22px;
    margin-bottom: 2px;
    border: 3px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dx-mb-item.dx-mb-highlight .dx-mb-icon svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
  }

  .dx-mb-item.dx-mb-highlight .dx-mb-label {
    color: #0b57d0;
    font-weight: 700;
  }

  .dx-mb-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #e02424;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(224, 36, 36, 0.4);
    line-height: 1;
  }

  /* Bottom Sheet Drawer */
  .dx-mobile-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 41, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99995;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  }

  .dx-mobile-sheet-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .dx-mobile-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 88vh;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    transform: translateY(105%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
  }

  .dx-mobile-sheet-overlay.open .dx-mobile-sheet {
    transform: translateY(0);
  }

  .dx-sheet-handle {
    width: 44px;
    height: 5px;
    background: #d0dbe5;
    border-radius: 3px;
    margin: 12px auto 6px;
    flex-shrink: 0;
  }

  .dx-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 12px;
    border-bottom: 1px solid #edf2f7;
    flex-shrink: 0;
  }

  .dx-sheet-title-group h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #173f61;
  }

  .dx-sheet-title-group p {
    margin: 2px 0 0;
    font-size: 11px;
    color: #698297;
  }

  .dx-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #486581;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .dx-sheet-search-wrap {
    padding: 12px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    flex-shrink: 0;
  }

  .dx-sheet-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #d8e2ec;
    border-radius: 12px;
    font-size: 13px;
    color: #173f61;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23889bb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
    box-sizing: border-box;
    outline: none;
  }

  .dx-sheet-search-input:focus {
    border-color: #0b57d0;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
  }

  .dx-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  .dx-sheet-cat {
    margin-bottom: 20px;
  }

  .dx-sheet-cat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #0b57d0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #e2e8f0;
  }

  .dx-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .dx-sheet-card {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e8eff6;
    border-radius: 12px;
    text-decoration: none;
    color: #173f61;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .dx-sheet-card:active {
    background: #eef4fb;
    border-color: #0b57d0;
  }

  .dx-sheet-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .dx-sheet-card-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #e6f0fd;
    color: #0b57d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
  }

  .dx-sheet-card-arrow {
    font-size: 12px;
    color: #9cb1c5;
  }

  .dx-sheet-card strong {
    font-size: 11px;
    font-weight: 700;
    color: #1a364d;
    line-height: 1.25;
  }

  .dx-sheet-card small {
    font-size: 9.5px;
    color: #71889c;
    margin-top: 2px;
    line-height: 1.25;
  }

  .dx-sheet-footer-contact {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
  }

  .dx-sheet-contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
  }

  .dx-sheet-contact-btn.phone {
    background: #eff6ff;
    color: #0b57d0;
    border: 1px solid #bfdbfe;
  }

  .dx-sheet-contact-btn.support {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
  }

  /* Instant Mobile Domain Finder Drawer */
  .dx-domain-sheet {
    max-height: 90vh;
  }

  .dx-m-ext-pill {
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #f1f5f9;
    color: #334e68;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }

  .dx-m-ext-pill strong {
    font-size: 11px;
    color: #64748b;
  }

  .dx-m-ext-pill.active {
    background: #005dd4;
    color: #ffffff;
    border-color: #005dd4;
    box-shadow: 0 2px 8px rgba(0, 93, 212, 0.25);
  }

  .dx-m-ext-pill.active strong {
    color: #bfdbfe;
  }

  @keyframes dxSpin {
    to { transform: rotate(360deg); }
  }

  @keyframes dxFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
