/* AnHonestHost WHMCS Custom Styles
 * Additional styles specific to the WHMCS client area.
 * These are not Bootstrap overrides — see overrides.css for those.
 */

/* ========== Base ========== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--anhh-accent);
  color: var(--anhh-bg);
}

/* ========== Background Effects ========== */
.anhh-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26, 86, 219, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 86, 219, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.anhh-light .anhh-bg-grid {
  display: none;
}

.anhh-bg-glow {
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 86, 219, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.anhh-light .anhh-bg-glow {
  display: none;
}

/* Ensure content sits above background effects */
.anhh-section,
nav,
footer,
header,
main {
  position: relative;
  z-index: 1;
}

/* ========== Navigation ========== */
.anhh-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--anhh-bg);
  backdrop-filter: blur(12px);
}

.anhh-light .anhh-nav {
  border-bottom-color: var(--anhh-border-color);
}

.anhh-nav-logo {
  display: flex;
  align-items: center;
  color: var(--anhh-text-primary);
  text-decoration: none;
}

.anhh-nav-logo:hover {
  color: var(--anhh-text-primary);
}

.anhh-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--anhh-text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.anhh-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.anhh-nav-links a {
  color: var(--anhh-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.anhh-nav-links a:hover {
  color: var(--anhh-text-primary);
}

.anhh-nav-cta {
  background: var(--anhh-primary) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s ease;
}

.anhh-nav-cta:hover {
  background: var(--anhh-primary-hover) !important;
  color: #fff !important;
}

/* ========== Nav Dropdown ========== */
.anhh-nav-has-dropdown {
  position: relative;
}

.anhh-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--anhh-bg-elevated);
  border: 1px solid var(--anhh-border-color);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  list-style: none;
  margin: 0;
  z-index: 200;
}

.anhh-nav-has-dropdown:hover .anhh-nav-dropdown {
  display: block;
}

.anhh-nav-dropdown li a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--anhh-text-secondary);
  white-space: nowrap;
}

.anhh-nav-dropdown li a:hover {
  background: var(--anhh-bg-surface);
  color: var(--anhh-text-primary);
}

/* ========== Theme Toggle ========== */
.anhh-theme-toggle {
  background: var(--anhh-bg-elevated);
  border: 1px solid var(--anhh-border-color);
  color: var(--anhh-text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  flex-shrink: 0;
}

.anhh-theme-toggle:hover {
  border-color: var(--anhh-accent);
  color: var(--anhh-text-primary);
}

.anhh-toggle-icon {
  font-style: normal;
  line-height: 1;
  font-size: 16px;
}

/* ========== Footer ========== */
.anhh-footer {
  border-top: 1px solid var(--anhh-border-color);
  padding: 56px 48px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.anhh-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.anhh-footer-brand {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--anhh-text-primary);
  text-decoration: none;
}

.anhh-footer-brand:hover {
  color: var(--anhh-text-primary);
}

.anhh-footer-logo {
  height: 24px;
  width: auto;
}

.anhh-footer-desc {
  color: var(--anhh-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.anhh-social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.anhh-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--anhh-bg-surface);
  color: var(--anhh-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.anhh-social-link:hover {
  background: var(--anhh-bg-elevated);
  color: var(--anhh-text-primary);
}

.anhh-footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--anhh-text-muted);
  margin-bottom: 18px;
}

.anhh-footer-col a {
  display: block;
  color: var(--anhh-text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.anhh-footer-col a:hover {
  color: var(--anhh-text-primary);
}

.anhh-footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--anhh-border-color);
  display: flex;
  justify-content: space-between;
  color: var(--anhh-text-muted);
  font-size: 12px;
}

/* ========== WHMCS Sidebar ========== */
.panel-sidebar .list-group-item {
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.panel-sidebar .list-group-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.panel-sidebar .list-group-item:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.panel-sidebar .list-group-item.active {
  border-left-color: var(--anhh-accent);
  background: var(--anhh-primary);
}

.panel-sidebar .list-group-item:hover:not(.active) {
  border-left-color: var(--anhh-accent);
}

/* Client area sidebar */
.client-area-sidebar .list-group-item {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.client-area-sidebar .list-group-item.active,
.client-area-sidebar .list-group-item:hover {
  border-left-color: var(--anhh-accent);
}

/* ========== Border Radius Enhancements ========== */
.panel {
  border-radius: 12px;
  overflow: hidden;
}

.panel > .panel-heading {
  border-radius: 0;
}

.form-control {
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn {
  border-radius: 8px;
  transition: all 0.2s ease;
}

.well {
  border-radius: 12px;
}

.alert {
  border-radius: 10px;
}

.modal-content {
  border-radius: 16px;
  overflow: hidden;
}

.breadcrumb {
  padding: 10px 16px;
}

.list-group {
  border-radius: 8px;
  overflow: hidden;
}

.table {
  border-radius: 8px;
  overflow: hidden;
}

/* ========== Smooth Transitions ========== */
.panel,
.list-group-item,
.form-control,
.btn,
.well,
.alert,
.table > tbody > tr,
a {
  transition: all 0.2s ease;
}

/* ========== WHMCS-Specific Layout Tweaks ========== */

/* Give invoice tables some breathing room */
.invoice-container .table td,
.invoice-container .table th {
  padding: 12px 16px;
}

/* Service status badges */
.label {
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 10px;
}

.label-success {
  background: var(--anhh-accent);
  color: var(--anhh-bg);
}

.label-danger {
  background: #ef4444;
}

.label-warning {
  background: #fbbf24;
  color: #0f172a;
}

.label-info {
  background: var(--anhh-primary);
}

/* Domain search form */
.domain-checker-container .form-control {
  height: 48px;
  font-size: 16px;
}

.domain-checker-container .btn {
  height: 48px;
}

/* Ticket system */
.ticket-reply {
  background: var(--anhh-bg-surface);
  border: 1px solid var(--anhh-border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.ticket-reply-staff {
  border-left: 3px solid var(--anhh-accent);
}

/* Input groups */
.input-group-addon {
  background: var(--anhh-bg-surface);
  border-color: var(--anhh-border-color);
  color: var(--anhh-text-muted);
}

/* Select elements */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Tooltips */
.tooltip-inner {
  background: var(--anhh-bg-surface);
  color: var(--anhh-text-primary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
}

/* Progress bars */
.progress {
  background: var(--anhh-bg-surface);
  border-radius: 8px;
  overflow: hidden;
  height: 8px;
}

.progress-bar {
  background: var(--anhh-accent);
  border-radius: 8px;
}

/* Close buttons */
.close {
  color: var(--anhh-text-muted);
  opacity: 0.7;
  text-shadow: none;
}

.close:hover {
  color: var(--anhh-text-primary);
  opacity: 1;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .anhh-nav {
    padding: 14px 16px;
  }

  .anhh-nav-toggle {
    display: block;
  }

  .anhh-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--anhh-bg-elevated);
    border-bottom: 1px solid var(--anhh-border-color);
    flex-direction: column;
    padding: 16px;
    gap: 0;
  }

  .anhh-nav-links.anhh-nav-open {
    display: flex;
  }

  .anhh-nav-links li {
    width: 100%;
  }

  .anhh-nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
  }

  .anhh-nav-links a:hover {
    background: var(--anhh-bg-surface);
  }

  .anhh-nav-cta {
    text-align: center;
    margin-top: 8px;
  }

  .anhh-nav-dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 16px;
    display: none;
  }

  .anhh-nav-has-dropdown.anhh-dropdown-open .anhh-nav-dropdown {
    display: block;
  }

  .anhh-footer {
    padding: 40px 16px;
  }

  .anhh-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .anhh-footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .anhh-nav {
    padding: 12px 8px;
  }
}
