/* Mortgage Calculator by Digiknown - Professional Frontend Styles */
.dmcbdk,
.dmcbdk * {
  box-sizing: border-box;
}

.dmcbdk {
  --dmc-white: #ffffff;
  --dmc-surface: #f7f9fc;
  --dmc-surface-2: #eef4fb;
  --dmc-ink: #0f172a;
  --dmc-text: #1e293b;
  --dmc-muted: #64748b;
  --dmc-border: #dbe3ee;
  --dmc-border-strong: #c5d0df;
  --dmc-primary: #0b5fbd;
  --dmc-primary-dark: #084a94;
  --dmc-primary-soft: #eaf3ff;
  --dmc-accent: #111827;
  --dmc-gold: #f4b63f;
  --dmc-success: #087443;
  --dmc-success-bg: #ecfdf3;
  --dmc-warning: #8a4b00;
  --dmc-warning-bg: #fff7e8;
  --dmc-danger: #b42318;
  --dmc-radius-sm: 10px;
  --dmc-radius: 18px;
  --dmc-radius-lg: 26px;
  --dmc-shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.08);
  --dmc-shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
  --dmc-shadow-lg: 0 26px 70px rgba(15, 23, 42, 0.16);
  width: min(100%, 1180px);
  margin: 32px auto;
  padding: 0 14px;
  color: var(--dmc-text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.dmcbdk :where(h2, h3, p) {
  margin-top: 0;
}

.dmcbdk h2 {
  margin-bottom: 10px;
  color: var(--dmc-ink);
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.dmcbdk h3 {
  color: var(--dmc-ink);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.25;
}

.dmcbdk p {
  color: var(--dmc-muted);
  line-height: 1.65;
}

.dmcbdk button,
.dmcbdk input,
.dmcbdk select {
  font: inherit;
}

.dmcbdk button {
  -webkit-tap-highlight-color: transparent;
}

.dmcbdk-hero,
.dmcbdk-calculator-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, 0.95);
  border-radius: var(--dmc-radius-lg);
  background:
    radial-gradient(circle at right top, rgba(11, 95, 189, 0.16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f6faff 54%, #edf5ff 100%);
  box-shadow: var(--dmc-shadow);
}

.dmcbdk-hero {
  display: grid;
  min-height: 180px;
  padding: clamp(26px, 4vw, 44px);
  margin-bottom: 24px;
}

.dmcbdk-hero::before,
.dmcbdk-calculator-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(11, 95, 189, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 95, 189, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 86%, transparent);
}

.dmcbdk-hero::after,
.dmcbdk-calculator-head::after {
  content: "";
  position: absolute;
  right: -78px;
  top: -90px;
  width: 240px;
  height: 240px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(244, 182, 63, 0.22);
  box-shadow: -42px 66px 0 rgba(11, 95, 189, 0.08);
}

.dmcbdk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 12px !important;
  color: var(--dmc-primary) !important;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.dmcbdk-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dmc-gold);
  box-shadow: 0 0 0 5px rgba(244, 182, 63, 0.2);
}

.dmcbdk-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.dmcbdk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 312px;
  padding: 28px 20px 20px;
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, 0.95);
  border-top: 9px solid var(--dmc-accent);
  border-radius: 4px 4px 18px 18px;
  background: var(--dmc-white);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dmcbdk-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 74px 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.13), transparent);
}

.dmcbdk-card:hover,
.dmcbdk-card:focus-within {
  transform: translateY(-5px);
  border-color: rgba(11, 95, 189, 0.38);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.2);
}

.dmcbdk-card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 0 16px;
  border: 1px solid rgba(11, 95, 189, 0.12);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #eaf3ff);
  color: var(--dmc-primary);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.08), 0 10px 24px rgba(11, 95, 189, 0.12);
}

.dmcbdk-card-icon svg {
  display: block;
  fill: currentColor;
}

.dmcbdk-card h3 {
  width: 100%;
  margin: 0 0 14px;
  color: #0a0f1b;
  font-size: clamp(1rem, 1.2vw, 1.16rem);
  font-weight: 900;
  line-height: 1.25;
}

.dmcbdk-card p {
  width: 100%;
  max-width: 210px;
  margin: 0 auto 26px;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.48;
}

.dmcbdk-card-button,
.dmcbdk-primary,
.dmcbdk-secondary,
.dmcbdk-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.dmcbdk-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: auto;
  border-radius: 0;
  background: var(--dmc-accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.dmcbdk-card-button::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v16h12V4H6Zm2 3h8v3H8V7Zm0 6h2v2H8v-2Zm4 0h2v2h-2v-2Zm4 0h2v2h-2v-2Zm-8 4h2v2H8v-2Zm4 0h2v2h-2v-2Zm4 0h2v2h-2v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dmcbdk-card-button:hover,
.dmcbdk-card-button:focus-visible {
  background: var(--dmc-primary);
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.dmcbdk-tabs {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 5;
  display: flex;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  margin: 0 0 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  border: 1px solid rgba(219, 227, 238, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--dmc-shadow-sm);
  backdrop-filter: blur(14px);
}

.dmcbdk-tab {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 12px 17px;
  border-radius: 999px;
  background: transparent;
  color: var(--dmc-muted);
  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.dmcbdk-tab:hover,
.dmcbdk-tab:focus-visible {
  background: var(--dmc-primary-soft);
  color: var(--dmc-primary-dark);
  outline: none;
}

.dmcbdk-tab.is-active {
  background: var(--dmc-primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(11, 95, 189, 0.26);
}

.dmcbdk-panel {
  display: none;
}

.dmcbdk-panel.is-active {
  display: block;
}

.dmcbdk-single .dmcbdk-calculator-head {
  margin-bottom: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.dmcbdk-calculator {
  overflow: hidden;
  border: 1px solid rgba(219, 227, 238, 0.98);
  border-radius: var(--dmc-radius-lg);
  background: #ffffff;
  box-shadow: var(--dmc-shadow-lg);
}

.dmcbdk-suite .dmcbdk-calculator-head {
  margin-bottom: 0;
  padding: clamp(22px, 3.4vw, 36px);
  border: 0;
  border-bottom: 1px solid var(--dmc-border);
  border-radius: 0;
  box-shadow: none;
}

.dmcbdk-calculator-head {
  padding: clamp(22px, 3.4vw, 36px);
}

.dmcbdk-calculator-head p:last-child,
.dmcbdk-hero p:last-child {
  max-width: 780px;
  margin-bottom: 0;
}

.dmcbdk-calculator-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.86fr);
  min-height: 440px;
}

.dmcbdk-form,
.dmcbdk-results {
  padding: clamp(22px, 3vw, 34px);
}

.dmcbdk-form {
  border-right: 1px solid var(--dmc-border);
  background:
    linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}

.dmcbdk-results {
  background:
    radial-gradient(circle at right top, rgba(11, 95, 189, 0.06), transparent 40%),
    #ffffff;
}

.dmcbdk-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dmcbdk-form-grid + .dmcbdk-form-grid,
.dmcbdk-form-grid + h3,
.dmcbdk-check + .dmcbdk-form-grid {
  margin-top: 18px;
}

.dmcbdk-form-grid-two {
  grid-template-columns: 1fr;
}

.dmcbdk-field,
.dmcbdk-check {
  display: block;
}

.dmcbdk-field span,
.dmcbdk-check span {
  display: block;
  margin-bottom: 8px;
  color: var(--dmc-ink);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.25;
}

.dmcbdk-field input,
.dmcbdk-field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--dmc-border-strong);
  border-radius: var(--dmc-radius-sm);
  background: #ffffff;
  color: var(--dmc-ink);
  outline: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.dmcbdk-field select {
  padding-right: 40px;
}

.dmcbdk-field input::placeholder {
  color: #94a3b8;
}

.dmcbdk-field input:hover,
.dmcbdk-field select:hover {
  border-color: #9fb0c5;
}

.dmcbdk-field input:focus,
.dmcbdk-field select:focus {
  border-color: var(--dmc-primary);
  box-shadow: 0 0 0 4px rgba(11, 95, 189, 0.13);
}

.dmcbdk-field em,
.dmcbdk-check em {
  display: block;
  margin-top: 7px;
  color: var(--dmc-muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.38;
}

.dmcbdk h3 + .dmcbdk-form-grid,
.dmcbdk h3 + .dmcbdk-check {
  margin-top: 0;
}

.dmcbdk-form h3 {
  margin: 26px 0 14px;
  padding-top: 4px;
  color: #0f172a;
  font-size: 1rem;
}

.dmcbdk-check {
  position: relative;
  margin: 16px 0 0;
  padding: 15px 15px 15px 50px;
  border: 1px solid var(--dmc-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.dmcbdk-check input {
  position: absolute;
  left: 17px;
  top: 17px;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--dmc-primary);
}

.dmcbdk-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.dmcbdk-primary,
.dmcbdk-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1;
}

.dmcbdk-primary {
  background: linear-gradient(135deg, var(--dmc-primary), #0a70df);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(11, 95, 189, 0.26);
}

.dmcbdk-primary:hover,
.dmcbdk-primary:focus-visible {
  background: linear-gradient(135deg, var(--dmc-primary-dark), var(--dmc-primary));
  color: #ffffff;
  transform: translateY(-1px);
  outline: none;
}

.dmcbdk-secondary {
  border: 1px solid var(--dmc-border-strong);
  background: #ffffff;
  color: var(--dmc-ink);
}

.dmcbdk-secondary:hover,
.dmcbdk-secondary:focus-visible {
  border-color: var(--dmc-primary);
  color: var(--dmc-primary-dark);
  background: var(--dmc-primary-soft);
  outline: none;
}

.dmcbdk-result-empty {
  display: grid;
  place-content: center;
  min-height: 340px;
  padding: 28px;
  border: 1px dashed #c3cfdd;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(11, 95, 189, 0.07), transparent 46%),
    #fbfdff;
  text-align: center;
}

.dmcbdk-result-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--dmc-ink);
  font-size: 1.15rem;
  font-weight: 850;
}

.dmcbdk-result-empty span {
  display: block;
  max-width: 330px;
  margin: 0 auto;
  color: var(--dmc-muted);
}

.dmcbdk-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dmcbdk-stat {
  position: relative;
  overflow: hidden;
  padding: 17px 16px;
  border: 1px solid var(--dmc-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dmcbdk-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--dmc-primary);
}

.dmcbdk-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--dmc-muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dmcbdk-stat strong {
  display: block;
  color: var(--dmc-ink);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.dmcbdk-stat em {
  display: block;
  margin-top: 7px;
  color: var(--dmc-muted);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.dmcbdk-alert {
  margin: 14px 0;
  padding: 14px 15px;
  border: 1px solid var(--dmc-border);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--dmc-text);
  font-size: 0.92rem;
  line-height: 1.55;
}

.dmcbdk-alert strong {
  color: inherit;
}

.dmcbdk-alert-info {
  border-color: rgba(11, 95, 189, 0.23);
  background: #edf6ff;
  color: #0a3f78;
}

.dmcbdk-alert-success {
  border-color: rgba(8, 116, 67, 0.23);
  background: var(--dmc-success-bg);
  color: #075232;
}

.dmcbdk-alert-warning {
  border-color: rgba(138, 75, 0, 0.22);
  background: var(--dmc-warning-bg);
  color: var(--dmc-warning);
}

.dmcbdk-alert-danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff1f0;
  color: var(--dmc-danger);
}

.dmcbdk-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--dmc-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dmcbdk-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dmcbdk-table th,
.dmcbdk-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--dmc-border);
  color: var(--dmc-text);
  text-align: left;
  vertical-align: top;
}

.dmcbdk-table th {
  background: #f2f6fb;
  color: var(--dmc-ink);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dmcbdk-table tr:nth-child(even) td {
  background: #fbfdff;
}

.dmcbdk-table tr:last-child td {
  border-bottom: 0;
}

.dmcbdk-note {
  margin: 0;
  padding: 16px clamp(22px, 3vw, 34px);
  border-top: 1px solid var(--dmc-border);
  background: #f8fafc;
  color: var(--dmc-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .dmcbdk-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dmcbdk {
    margin: 24px auto;
  }

  .dmcbdk-calculator-body {
    grid-template-columns: 1fr;
  }

  .dmcbdk-form {
    border-right: 0;
    border-bottom: 1px solid var(--dmc-border);
  }

  .dmcbdk-results {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  .dmcbdk {
    padding: 0 10px;
  }

  .dmcbdk-hero,
  .dmcbdk-calculator-head {
    border-radius: 20px;
  }

  .dmcbdk-card-grid,
  .dmcbdk-form-grid,
  .dmcbdk-result-summary {
    grid-template-columns: 1fr;
  }

  .dmcbdk-card {
    min-height: 0;
  }

  .dmcbdk-card p {
    max-width: 100%;
  }

  .dmcbdk-tabs {
    position: relative;
    top: auto;
    border-radius: 18px;
  }

  .dmcbdk-tab {
    flex: 0 0 auto;
    padding-inline: 15px;
  }

  .dmcbdk-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dmcbdk-primary,
  .dmcbdk-secondary {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .dmcbdk {
    padding: 0 6px;
    font-size: 15px;
  }

  .dmcbdk-hero,
  .dmcbdk-calculator-head,
  .dmcbdk-form,
  .dmcbdk-results {
    padding: 20px;
  }

  .dmcbdk-calculator {
    border-radius: 20px;
  }

  .dmcbdk-table {
    min-width: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dmcbdk *,
  .dmcbdk *::before,
  .dmcbdk *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .dmcbdk-print-focus,
  .dmcbdk-print-focus * {
    visibility: visible !important;
  }

  .dmcbdk-print-focus {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .dmcbdk-form-actions,
  .dmcbdk-tabs,
  .dmcbdk-card-grid,
  .dmcbdk-hero {
    display: none !important;
  }

  .dmcbdk-calculator,
  .dmcbdk-calculator-head,
  .dmcbdk-form,
  .dmcbdk-results,
  .dmcbdk-stat,
  .dmcbdk-table-wrap {
    box-shadow: none !important;
  }
}
