/* UN TOQUE Tarifa: tarjetas 3D coherentes y textos legibles. */
.app-shell .service-page .action-card.service-card-3d {
  --card-shadow: 30 77 129;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  padding: 0;
  border: 2px solid #4b8cc6;
  border-radius: 22px;
  background: linear-gradient(155deg, #f1f8ff 0%, #dcecff 69%, #cfe4fb 100%);
  color: #092f60;
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 #a6c6e5, 0 10px 18px rgb(13 60 108 / 17%);
}
.app-shell .service-page .action-card.service-card-3d > :is(img, svg, div, .action-symbol, small, strong) { display: none; }
.app-shell .service-page .action-card.service-card-3d::before {
  content: '';
  display: block;
  flex: 1 1 auto;
  width: min(90%, 152px);
  min-height: 0;
  align-self: center;
  background-image: var(--service-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.app-shell .service-page .action-card.service-card-3d > span:not(.action-symbol),
.app-shell .service-page .action-card.service-card-3d[data-display-label]::after {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 49px;
  padding: 5px 4px 7px;
  margin: 0;
  border-top: 1px solid #bdd5ed;
  background: rgb(255 255 255 / 94%);
  color: #092f60;
  font-size: clamp(14px, min(3.5cqh, 4cqi), 21px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}
.app-shell .service-page .action-card.service-card-3d[data-display-label]::after { content: attr(data-display-label); }
.app-shell .service-page .action-card.service-card-3d.red {
  border-color: #c74652;
  background: linear-gradient(155deg, #fff4f4, #ffe0e1);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 #eab1b5, 0 10px 18px rgb(143 30 41 / 17%);
}
.app-shell .service-page .action-card.service-card-3d.red > span:not(.action-symbol) { border-top-color: #efc6ca; }
.app-shell .service-page .action-card.service-card-3d.coming-soon {
  border-color: #bdc9d6;
  background: #eef3f8;
  opacity: 1;
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 #d2dce5;
}
.app-shell .service-page .action-card.service-card-3d.coming-soon::after { color: #52657a; }
.app-shell .service-page .action-card.service-card-3d:active { transform: translateY(4px); }
.app-shell .service-page .action-card.service-card-3d:focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.app-shell .service-page .action-card.service-card-3d.has-custom-photo::before { display: none; }
.app-shell .service-page .action-card.service-card-3d.has-custom-photo > img.family-card-photo {
  display: block;
  flex: 1 1 auto;
  align-self: center;
  width: min(90%, 145px);
  height: min(65%, 145px);
  object-fit: cover;
  border-radius: 15px;
  padding: 4px;
  margin: 0;
}
body:has(.modal-backdrop) .local-assistant-launch { visibility: hidden; }
.detail-panel :is(.detail-actions button, .detail-actions a, .primary-detail-action, .speak-wide, .emergency-options button, .emergency-options a, .confirm-view a, .cancel-call) {
  min-height: 66px;
  border-radius: 18px;
  font-size: clamp(17px, 4.3vw, 21px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
  text-wrap: balance;
}
.detail-panel :is(.detail-actions button, .detail-actions a, .primary-detail-action, .speak-wide):not(.urgent-detail-action):not(.call-112):not(.whatsapp-action):not(.pharmacy-call):not(.appointment-call) {
  border: 2px solid #3a76b5;
  background: linear-gradient(180deg, #fff, #e9f4ff);
  color: #0b3769;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #b4d0eb, 0 8px 15px rgb(17 65 108 / 15%);
}
.detail-panel :is(.detail-actions button, .detail-actions a, .primary-detail-action, .speak-wide, .emergency-options button, .emergency-options a, .confirm-view a, .cancel-call):focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.detail-panel [data-action3d] { display: flex; align-items: center; justify-content: center; gap: 8px; }
.detail-panel [data-action3d]::before {
  content: '';
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.detail-panel [data-action3d='appointment']::before { background-image: url('/iconos-3d-acciones/accion-pedir-cita.webp'); }
.detail-panel [data-action3d='call']::before { background-image: url('/iconos-3d-acciones/accion-llamar.webp'); }
.detail-panel [data-action3d='listen']::before { background-image: url('/iconos-3d-acciones/accion-escuchar.webp'); }
.detail-panel [data-action3d='back']::before { background-image: url('/iconos-3d-acciones/accion-volver.webp'); }
.detail-panel [data-action3d='emergency']::before { background-image: url('/iconos-3d/03-emergencias.webp'); }
@media (orientation: landscape) and (max-height: 520px) {
  .app-shell .service-page .action-card.service-card-3d { flex-direction: column; flex-wrap: nowrap; }
  .app-shell .service-page .action-card.service-card-3d::before { width: min(84%, 116px); }
  .app-shell .service-page .action-card.service-card-3d > span:not(.action-symbol) { min-height: 37px; font-size: 13px; }
}

.app-shell .service-page .action-card.service-card-3d[data-display-label] > span:not(.action-symbol) { display: none; }

/* Reserve a clear space for chat and hide it while a service dialog is open. */
body:has(.modal-backdrop) #utc-btn,
body:has(.modal-backdrop) #utc-box { display: none !important; }
@media (max-width: 520px) {
  html body .app-shell { padding-bottom: max(92px, env(safe-area-inset-bottom)) !important; }
}

/* The standalone service pages share the same large, legible controls. */
.detail-panel :is(.dt-help-voice, .dt-primary, .dt-secondary, .dt-microphone, .employment-secondary, .employment-listen, .football-back, .cook-wide, .cook-pantry, .cook-community-entry),
.daily-tools :is(.dt-help-voice, .dt-primary, .dt-secondary, .dt-microphone) {
  min-height: 62px;
  border: 2px solid #3a76b5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #e9f4ff);
  color: #0b3769;
  font-size: clamp(17px, 4.3vw, 21px);
  font-weight: 900;
  line-height: 1.15;
  text-wrap: balance;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #b4d0eb, 0 8px 15px rgb(17 65 108 / 15%);
}
.detail-panel :is(.dt-help-voice, .dt-primary, .dt-secondary, .dt-microphone, .employment-secondary, .employment-listen, .football-back, .cook-wide, .cook-pantry, .cook-community-entry):focus-visible,
.daily-tools :is(.dt-help-voice, .dt-primary, .dt-secondary, .dt-microphone):focus-visible {
  outline: 4px solid #092f60;
  outline-offset: 3px;
}
.detail-panel :is(.cook-choice, .cook-recipe-list button) {
  border: 2px solid #4b8cc6;
  border-radius: 18px;
  background: linear-gradient(155deg, #f1f8ff, #dcecff);
  color: #092f60;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #a6c6e5, 0 8px 15px rgb(13 60 108 / 15%);
}
.detail-panel .cook-choice {
  min-height: 126px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  text-align: center;
  font-weight: 900;
}
.detail-panel .cook-choice .cook-category-icon { width: 72px; height: 72px; object-fit: contain; }
.detail-panel .cook-choice .cook-choice-label { font-size: clamp(15px, 4vw, 20px); line-height: 1.1; }
.detail-panel [data-action3d]:not(.urgent-detail-action):not(.call-112):not(.whatsapp-action) { min-height: 62px; }
.detail-panel [data-action3d]:focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.dt-cards .dt-card-open.tool-card-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  border: 2px solid #4b8cc6;
  border-radius: 20px;
  background: linear-gradient(155deg, #f1f8ff, #dcecff);
  color: #092f60;
  text-align: center;
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 #a6c6e5, 0 10px 18px rgb(13 60 108 / 17%);
}
.dt-cards .dt-card-open.tool-card-3d::before {
  content: '';
  width: 100px;
  height: 100px;
  background: var(--service-icon) center / contain no-repeat;
}
.dt-cards .dt-card-open.tool-card-3d .dt-icon { display: none; }
.dt-cards .dt-card-open.tool-card-3d h2 { color: #092f60; font-weight: 950; font-size: clamp(20px, 5vw, 25px); margin: 4px 0; }
.dt-cards .dt-card-open.tool-card-3d:focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.bus-feria-app :is(.feria-back-home, .route-overview),
.restaurant-app .header-control {
  min-height: 60px;
  border: 2px solid #3a76b5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #e9f4ff);
  color: #0b3769;
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #b4d0eb;
}
.bus-feria-app :is(.feria-back-home, .route-overview):focus-visible,
.restaurant-app .header-control:focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.detail-panel .calendar-home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 62px;
  border: 2px solid #3a76b5;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #e9f4ff);
  color: #0b3769;
  font-size: clamp(17px, 4.3vw, 21px);
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 #b4d0eb;
}
.detail-panel .calendar-home-link:focus-visible { outline: 4px solid #092f60; outline-offset: 3px; }
.detail-panel .dt-accessibility button { font-size: 16px; }

/* Match the visible size of the gift icon to the neighbouring service icons. */
.app-shell .service-page .action-card.service-card-3d.gift-entry::before { background-size: 108% 100%; }
