/* Premium Customer Support modal. Functionality remains owned by firebase.js. */
body[data-page="dashboard"] .home-service-modal {
  width: min(100%, 480px);
  z-index: 500 !important;
  padding: 12px;
  align-items: end;
  overflow: hidden;
}

body[data-page="dashboard"] .home-service-backdrop {
  inset: -12px;
  background: rgba(29, 20, 16, 0.48);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  animation: supportFadeIn 240ms ease-out both;
}

body[data-page="dashboard"] .home-service-sheet {
  isolation: isolate;
  width: 100%;
  max-height: calc(100dvh - 24px);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  background: rgba(255, 251, 247, 0.97);
  box-shadow: 0 28px 70px rgba(76, 35, 11, 0.28), 0 8px 22px rgba(249, 115, 22, 0.18);
  animation: supportSheetUp 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body[data-page="dashboard"] .home-service-premium-head {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 13px;
  min-height: 138px;
  padding: 24px 20px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ff9a3d 0%, #f97316 48%, #e95b0c 100%);
}

body[data-page="dashboard"] .home-service-premium-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.24), transparent 38%),
    repeating-linear-gradient(125deg, transparent 0 42px, rgba(255,255,255,0.055) 43px 44px);
}

body[data-page="dashboard"] .home-service-title-icon,
body[data-page="dashboard"] .home-service-title-copy,
body[data-page="dashboard"] .home-service-close {
  position: relative;
  z-index: 1;
}

body[data-page="dashboard"] .home-service-title-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.48), 0 12px 25px rgba(121, 46, 5, 0.2);
}

body[data-page="dashboard"] .home-service-title-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.1;
}

body[data-page="dashboard"] .home-service-title-copy {
  min-width: 0;
}

body[data-page="dashboard"] .home-service-title-copy p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

body[data-page="dashboard"] .home-service-title-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

body[data-page="dashboard"] .home-service-title-copy > span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

body[data-page="dashboard"] .home-service-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 220ms ease, background 220ms ease;
}

body[data-page="dashboard"] .home-service-close:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.28);
}

body[data-page="dashboard"] .home-service-close svg {
  width: 19px;
  height: 19px;
}

body[data-page="dashboard"] .home-service-content {
  display: grid;
  gap: 13px;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(255, 239, 225, 0.58), transparent 86px),
    rgba(255, 252, 249, 0.96);
}

body[data-page="dashboard"] .home-service-agent {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(83, 45, 23, 0.09), inset 0 1px 0 #fff;
  animation: supportCardIn 280ms 70ms ease-out both;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

body[data-page="dashboard"] .home-service-agent:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(83, 45, 23, 0.13), inset 0 1px 0 #fff;
}

body[data-page="dashboard"] .home-service-avatar {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #ffac55, #f97316 58%, #e75a0b);
  box-shadow: 0 10px 22px rgba(229, 86, 8, 0.24), inset 0 1px 0 rgba(255,255,255,0.4);
}

body[data-page="dashboard"] .home-service-avatar > svg {
  width: 27px;
  height: 27px;
}

body[data-page="dashboard"] .home-service-presence {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
  animation: supportPresence 1.8s ease-out infinite;
}

body[data-page="dashboard"] .home-service-agent-copy {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: 7px;
}

body[data-page="dashboard"] .home-service-agent-copy > strong {
  overflow: hidden;
  color: #241d1a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="dashboard"] .home-service-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 999px;
  color: #178c45;
  background: #effcf3;
  font-size: 10px;
  font-weight: 800;
}

body[data-page="dashboard"] .home-service-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

body[data-page="dashboard"] .home-service-verified {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #f97316;
  background: #fff2e7;
}

body[data-page="dashboard"] .home-service-verified svg {
  width: 20px;
  height: 20px;
}

body[data-page="dashboard"] .home-service-option {
  position: relative;
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  overflow: hidden;
  border-radius: 17px;
  font: inherit;
  text-align: left;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="dashboard"] .home-service-option::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255,255,255,0.48), transparent 55%);
  transform: scale(0.55);
  transition: opacity 220ms ease, transform 260ms ease;
}

body[data-page="dashboard"] .home-service-option:active {
  transform: scale(0.975);
}

body[data-page="dashboard"] .home-service-option:active::after {
  opacity: 1;
  transform: scale(1.25);
  transition-duration: 0ms;
}

body[data-page="dashboard"] .home-service-option > .home-service-option-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
}

body[data-page="dashboard"] .home-service-option > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body[data-page="dashboard"] .home-service-option strong,
body[data-page="dashboard"] .home-service-option small {
  position: relative;
  z-index: 1;
}

body[data-page="dashboard"] .home-service-option strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

body[data-page="dashboard"] .home-service-option small {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

body[data-page="dashboard"] .home-service-option > svg {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
}

body[data-page="dashboard"] .home-service-contact {
  border: 1px solid rgba(249, 115, 22, 0.28);
  color: #28170e !important;
  background: linear-gradient(135deg, #fff8f2 0%, #ffe8d3 52%, #ffc58e 100%) !important;
  box-shadow: 0 13px 26px rgba(232, 91, 12, 0.19), inset 0 1px 0 rgba(255,255,255,0.9);
  animation: supportCardIn 280ms 110ms ease-out both, supportGlow 2.8s 500ms ease-in-out infinite;
}

body[data-page="dashboard"] .home-service-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 34px rgba(232, 91, 12, 0.25), inset 0 1px 0 rgba(255,255,255,0.95);
}

body[data-page="dashboard"] .home-service-contact > .home-service-option-icon {
  color: #fff;
  background: linear-gradient(145deg, #ff9d3f, #f97316 58%, #e95b0c);
  box-shadow: 0 6px 15px rgba(114, 43, 5, 0.16);
}

body[data-page="dashboard"] .home-service-contact strong {
  color: #28170e !important;
}

body[data-page="dashboard"] .home-service-contact small {
  color: #71452e !important;
}

body[data-page="dashboard"] .home-service-contact > svg {
  color: #c6530f;
}

body[data-page="dashboard"] .home-service-community {
  border: 1px solid rgba(249, 115, 22, 0.15);
  color: #2c2420;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(83, 45, 23, 0.08);
  animation: supportCardIn 280ms 150ms ease-out both;
}

body[data-page="dashboard"] .home-service-community:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 14px 30px rgba(83, 45, 23, 0.12);
}

body[data-page="dashboard"] .home-service-community > .home-service-option-icon {
  color: #f97316;
  background: #fff0e4;
}

body[data-page="dashboard"] .home-service-community small {
  color: #7f746d;
}

body[data-page="dashboard"] .home-service-community > svg {
  color: #d9661a;
}

@keyframes supportFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes supportSheetUp {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes supportPresence {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

@keyframes supportGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.045); }
}

@media (max-width: 350px) {
  body[data-page="dashboard"] .home-service-modal { padding: 8px; }
  body[data-page="dashboard"] .home-service-backdrop { inset: -8px; }
  body[data-page="dashboard"] .home-service-premium-head {
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    gap: 10px;
    min-height: 126px;
    padding: 20px 14px;
  }
  body[data-page="dashboard"] .home-service-title-icon { width: 48px; height: 48px; border-radius: 15px; }
  body[data-page="dashboard"] .home-service-title-copy h2 { font-size: 20px; }
  body[data-page="dashboard"] .home-service-title-copy > span { font-size: 11px; }
  body[data-page="dashboard"] .home-service-close { width: 36px; height: 36px; }
  body[data-page="dashboard"] .home-service-content { gap: 11px; padding: 13px 12px calc(14px + env(safe-area-inset-bottom)); }
  body[data-page="dashboard"] .home-service-agent { grid-template-columns: 52px minmax(0, 1fr) 32px; gap: 10px; padding: 12px; }
  body[data-page="dashboard"] .home-service-avatar { width: 52px; height: 52px; border-radius: 16px; }
  body[data-page="dashboard"] .home-service-agent-copy > strong { font-size: 14px; }
  body[data-page="dashboard"] .home-service-option { grid-template-columns: 40px minmax(0, 1fr) 18px; gap: 9px; padding: 10px; }
  body[data-page="dashboard"] .home-service-option > .home-service-option-icon { width: 40px; height: 40px; }
  body[data-page="dashboard"] .home-service-option strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="dashboard"] .home-service-backdrop,
  body[data-page="dashboard"] .home-service-sheet,
  body[data-page="dashboard"] .home-service-agent,
  body[data-page="dashboard"] .home-service-option,
  body[data-page="dashboard"] .home-service-presence {
    animation: none;
  }
}
