/* ---------- APC PRICE CALCULATOR — FINAL UPDATED CSS ---------- */

/* Outer container: centers the calculator and reduces side padding on small screens */
.apc-calc-outer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
  background: transparent;
  margin: 0;
}

/* Calculator card: rounded corners + subtle outer shadow (clean look) */
.apc-calc-wrap {
  background: #ffffff;
  border: 1px solid rgba(210,210,210,0.95);               /* subtle stroke */
  border-radius: 18px;                                    /* smooth rounded corners */
  box-shadow:
    0 8px 18px rgba(0,0,0,0.08),                          /* main soft shadow */
    0 2px 6px rgba(0,0,0,0.04);                           /* secondary lift */
  padding: 26px;
  max-width: 760px;
  width: 100%;
  text-align: center;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 16px auto 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* hover elevation */
.apc-calc-wrap:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 26px rgba(0,0,0,0.12),
    0 3px 10px rgba(0,0,0,0.06);
}

/* Title */
.apc-calc-wrap h3 {
  margin: 0 0 14px 0;
  color: #073763;
  font-size: 1.4rem;
  font-weight: 700;
}

/* Row layout: stacked, centered */
.apc-row {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.apc-row label { font-weight: 600; margin: 0; text-align: center; }

/* Author type select */
#apc_author_type {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d0d0d0;
  min-width: 180px;
  font-size: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* input + step button wrapper */
.apc-input-with-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* NUMBER INPUT: unified widths so both boxes look identical across devices */
.apc-row input[type="number"] {
  width: 180px;           /* desktop default */
  max-width: 180px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.apc-row input[type="number"]:focus {
  outline: none;
  border-color: #0a77d0;
  box-shadow: 0 0 0 4px rgba(10,119,208,0.08);
}

/* STEP BUTTONS (+ / -): centered symbols and small glass highlight */
.apc-step {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(to bottom, #2b2b2b, #0f0f0f); /* dark gradient */
  color: #ffffff;
  font-size: 22px;
  font-weight: 500;
  display: flex;
  align-items: center;       /* vertical centering */
  justify-content: center;   /* horizontal centering */
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.20), /* subtle top glare */
    0 3px 6px rgba(0,0,0,0.22);             /* outer button shadow */
  /* micro vertical shift to ensure symbol sits perfectly center across browsers */
  transform: translateY(-1px);
}

/* Hover / active states for step buttons */
.apc-step:hover {
  background: linear-gradient(to bottom, #3a3a3a, #161616);
  transform: translateY(-2px);
}
.apc-step:active {
  transform: scale(0.96) translateY(0);
}
.apc-step:focus {
  outline: 2px solid rgba(10,103,200,0.24);
  outline-offset: 2px;
}

/* Hint / description */
.apc-hint {
  font-size: 13px;
  color: #555;
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
}

/* Calculate / Reset result area */
.apc-row.apc-center-row { display:flex; justify-content:center; }
.apc-result {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

/* Action buttons */
.apc-actions { margin-top: 14px; display:flex; justify-content:center; gap:12px; }
.apc-btn {
  padding: 10px 18px;
  border: none;
  background: linear-gradient(to bottom, #0a88e2, #0a77d0);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
  transition: transform .12s ease, background .12s ease;
}
.apc-btn:hover { transform: translateY(-1px); background: linear-gradient(to bottom, #0966b5, #075299); }
.apc-btn:active { transform: translateY(0); }

/* smaller screens: tablet and mobile */
@media (max-width: 768px) {
  .apc-row input[type="number"] { width: 170px; max-width:170px; }
  .apc-step { width: 36px; height:36px; font-size:20px; transform: translateY(-0.8px); }
  .apc-calc-wrap { padding: 20px; max-width: 700px; }
}

@media (max-width: 480px) {
  .apc-calc-outer { padding: 0 4px; }
  .apc-calc-wrap { padding: 18px 10px; max-width: 98%; }
  .apc-row input[type="number"] { width: 150px; max-width:150px; }
  .apc-step { width: 32px; height:32px; font-size:18px; transform: translateY(-0.6px); }
  .apc-row input[type="number"] { font-size: 0.98rem; }
}

/* Accessibility helpers: focus visible */
.apc-step:focus-visible, .apc-btn:focus-visible, #apc_author_type:focus-visible, .apc-row input[type="number"]:focus-visible {
  outline: 3px solid rgba(10,119,208,0.12);
  outline-offset: 2px;
}

/* Minor utility: keep everything centered visually */
.apc-calc-wrap, .apc-row, .apc-input-with-btn { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }