/* WORKNET SEGUROS - APPLE CONFIGURATOR COMPONENTS (PADRONIZADO IMAGEM 2) */
/* --- Apple Pill Buttons --- */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.85rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  font-family: inherit;
  position: relative;
  isolation: isolate;
}

/* Liquid glass sheen: highlight sutil no topo, como o material do iOS/Apple HIG */
.btn-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
  z-index: 1;
}

.btn-pill > * {
  position: relative;
  z-index: 2;
}

.btn-pill-blue {
  background: var(--worknet-blue);
  color: var(--text-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-pill-blue:hover {
  background: var(--worknet-blue-hover);
  box-shadow: 0 6px 22px rgba(0, 113, 227, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-pill-red {
  background: var(--worknet-red);
  color: var(--text-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-pill-red:hover {
  background: var(--worknet-red-hover);
  box-shadow: 0 6px 22px rgba(225, 29, 72, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-pill-outline {
  background: var(--glass-bg-dark);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text-white);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow-dark);
}

.btn-pill-outline:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  border-color: var(--text-white);
  transform: translateY(-2px);
}

.btn-pill-outline-dark {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--primary-navy);
}

.btn-pill-outline-dark:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--primary-navy);
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 1.1rem 2.35rem;
  font-size: 1.08rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

/* --- Apple Action Link --- */
.apple-action-link {
  font-size: 1.1rem;
  font-weight: 700;
  color: #38BDF8;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: gap 0.2s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.apple-action-link:hover {
  gap: 0.7rem;
  text-decoration: underline;
}

.apple-action-link.red-link {
  color: #FB7185;
}

/* --- Apple Configurator Split Layout (Padronizado Conforme Imagem 2) --- */
.apple-configurator-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
  width: 100%;
}

.configurator-summary-card {
  background: var(--apple-card);
  border-radius: var(--radius-card);
  border: var(--border-hairline-light);
  box-shadow: var(--shadow-tile);
  padding: 2.75rem 2.5rem;
  text-align: left;
  width: 100%;
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: var(--border-hairline-light);
}

.summary-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--worknet-blue), #0284C7);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.25);
}

.summary-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.summary-card-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.summary-benefits-list li {
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.summary-benefits-list i {
  color: #10B981;
  font-size: 1.15rem;
}

/* --- iOS Segmented Control --- */
.segmented-control {
  background: #E5E5EA;
  padding: 5px;
  border-radius: 14px;
  display: flex;
  gap: 5px;
  margin-bottom: 2.25rem;
  width: 100%;
}

.segmented-btn {
  flex: 1;
  padding: 0.75rem 0.65rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.segmented-btn.active {
  background: #FFFFFF;
  color: var(--primary-navy);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* --- Configurator Right Form Container --- */
.configurator-form-card {
  background: var(--apple-card);
  border-radius: var(--radius-card);
  border: var(--border-hairline-light);
  box-shadow: var(--shadow-tile);
  padding: 2.75rem 2.5rem;
  text-align: left;
  width: 100%;
}

.step-pane {
  display: none;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-pane.active {
  display: block;
}

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

/* Options Grid in Wizard */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  width: 100%;
}

.option-card {
  border: 1px solid #E5E5EA;
  border-radius: 18px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: var(--apple-bg);
}

.option-card .icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #FFFFFF;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.badge-blue { background: linear-gradient(135deg, #0071E3, #0284C7); }
.badge-red { background: linear-gradient(135deg, #E11D48, #BE123C); }
.badge-emerald { background: linear-gradient(135deg, #10B981, #059669); }
.badge-purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.badge-gold { background: linear-gradient(135deg, #F59E0B, #D97706); }
.badge-cyan { background: linear-gradient(135deg, #06B6D4, #0891B2); }

.option-card span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-navy);
}

.option-card:hover {
  border-color: var(--worknet-blue);
  background: #FFFFFF;
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--worknet-blue);
  background: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.22);
}

.option-card.selected .icon-badge {
  transform: scale(1.1);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.35rem;
  text-align: left;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: var(--primary-navy);
}

.form-control {
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: var(--radius-button);
  border: 1px solid #D1D1D6;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--apple-bg);
}

.form-control:focus {
  outline: none;
  border-color: var(--worknet-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Native HTML5 Apple Glass Modal */
dialog.apple-modal {
  border: none;
  border-radius: var(--radius-card);
  padding: 0;
  max-width: 560px;
  width: 90%;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
  background: var(--apple-card);
  overflow: hidden;
  margin: auto;
}

dialog.apple-modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.modal-header {
  padding: 1.4rem 2rem;
  background: var(--primary-navy);
  color: var(--text-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 2.25rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--primary-navy);
  color: var(--text-white);
  padding: 1rem 1.6rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-tile);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: var(--border-hairline-dark);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 992px) {
  .apple-configurator-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Publication: accessible forms and privacy notice. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10000; padding: 12px 18px; background: white; color: #0f172a; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #0071e3; outline-offset: 4px; }
.no-script { padding: 20px; }
.no-script a, .privacy-notice a, .legal-content a { text-decoration: underline; text-underline-offset: 3px; }
.apple-configurator-grid > *, .configurator-form-card, .contact-fields > * { min-width: 0; }
.options-grid { border: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option-card { position: relative; min-width: 0; overflow-wrap: anywhere; }
.option-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-card:focus-within { outline: 3px solid var(--worknet-blue); outline-offset: 3px; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.field-help { color: #51515a; font-size: .85rem; line-height: 1.5; margin-top: .5rem; }
.privacy-notice { font-size: .9rem; line-height: 1.6; color: #3f4650; margin: 1.25rem 0; }
.privacy-notice p + p { margin-top: .6rem; }
.privacy-check { display: flex; gap: .75rem; align-items: flex-start; margin-top: 1rem; cursor: pointer; }
.privacy-check input { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px; accent-color: #0071e3; }
.form-error { color: #b91c1c; font-weight: 600; font-size: .95rem; }
.form-error:not(:empty) { margin: 1rem 0; }
[aria-invalid="true"] { border-color: #b91c1c; }
dialog.apple-modal { max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.legal-content { padding-top: 3rem; padding-bottom: 4rem; overflow-wrap: anywhere; }
.legal-content h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.03em; line-height: 1.1; margin: 1rem 0; }
.legal-content h2 { margin: 2rem 0 .75rem; font-size: 1.4rem; }
.legal-content p, .legal-content ul { margin: .8rem 0; }
.legal-content ul { list-style: disc; padding-left: 1.3rem; }
.legal-content li { margin: .5rem 0; }
.legal-content .updated { color: #51515a; }
.legal-content .legal-intro { font-size: 1.15rem; }
@media (max-width: 640px) {
  .configurator-form-card { padding: 1.5rem 1rem; }
  .options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .option-card { padding: 1rem .5rem; }
  .contact-fields { grid-template-columns: 1fr; gap: 0; }
  .segmented-btn { padding: .7rem .2rem; font-size: .8rem; min-width: 0; }
  .modal-header, .modal-body { padding: 1.25rem; }
  .modal-title { font-size: 1rem; }
  #btn-wizard-submit { white-space: normal; }
  .configurator-summary-card { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.js-form-fields { border: 0; min-width: 0; padding: 0; margin: 0; }
