/* MAO Calculator – Frontend Styles */
:root {
  --mao-primary: #0d9488;
}
body {
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
}
.mao-wrap {
  max-width: 736px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: 100vh;
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

.mao-header {
  text-align: center;
  margin-bottom: 3rem;
}

.mao-title {
  font-size: 3rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1;
}

.mao-subtitle {
  margin: 0;
  margin-top: 0.75rem;
  font-size: 18px;
  color: #64748b;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .mao-title {
    font-size: 3.75rem;
  }
  .mao-subtitle {
    font-size: 20px;
  }
}
.mao-card {
  background: #fff;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  padding: 3rem;
}
.divider {
  margin-top: 2rem;
  margin-bottom: 2rem;
  height: 1px;
  background: linear-gradient(to right, transparent, #e2e8f0, transparent);
  display: block;
}
/* Fields */
.mao-field {
  margin-bottom: 28px;
}
.mao-card .mao-field:first-child label.mao-label {
  font-size: 14px;
}
.mao-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  letter-spacing: 0.025em;
  margin-bottom: 0.5rem;
}

/* Input wrapper with $ prefix */
.mao-stepper {
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  overflow: hidden;
}
.mao-prefix {
  padding-left: 1rem;
  color: #94a3b8;
  font-size: 15px;
}

body .mao-field .mao-input {
  border: none;
  height: 46px;
  width: 100%;
  background: transparent;
  padding: 0.55rem 0.75rem;
  font-size: 16px;
  color: #1e293b;
  outline: none;
  min-height: initial;
}
.mao-input::-webkit-outer-spin-button,
.mao-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.mao-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid oklch(86.9% 0.022 252.894);
  border-radius: 0.625rem;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s;
}
/* Stepper (Rule %) */
.mao-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.2s;
}

.mao-stepper:focus-within {
  border-color: var(--mao-primary);
}

.mao-step-btn {
  background: transparent;
  border: none;
  width: 60px;
  height: 48px;
  line-height: 1;
  padding: 0.875rem 1.25rem;
  color: #64748b;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.mao-step-btn:hover {
  color: #008080;
  background-color: #f8fafc;
}
input#mao_rule {
  flex: 1;
  background: transparent;
  padding: 0.875rem 0.75rem;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
  outline: none;
  min-height: 55px;
}
.mao-input-center {
  text-align: center;
  flex: 1;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Result Cards */
.mao-result-card {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid;
  transition: all 0.15s ease-in-out;
  border-color: rgba(0, 128, 128, 0.18);
  background-color: rgba(0, 128, 128, 0.06);
}

.mao-result-card--secondary {
  background: color-mix(in srgb, var(--mao-primary) 5%, #f8fffe);
}

.mao-result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #334155;
  font-weight: 700;
}

.mao-result-value {
  color: var(--mao-primary);
  letter-spacing: -1px;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
div#mao_ws_card {
  margin: 0;
}
@media (min-width: 768px) {
  .mao-result-value {
    font-size: 30px;
  }
}
/* Negative result */
.mao-result-value.mao-negative {
  color: #e53e3e;
}
@media (max-width: 767px) {
  .mao-card {
    padding: 2rem 1rem;
  }
  .mao-subtitle {
    font-size: 16px;
  }
}
