/* গজ-গিরা ক্যালকুলেটর — v1.1.0
   থিম: মাপার ফিতা / দর্জির রসিদ — মাপ ও দামের হিসাবের সাথে মানানসই একটি ভিজ্যুয়াল ভাষা */

.ggc-outer {
  --ggc-paper: #FBF6EC;
  --ggc-ink: #2B1B14;
  --ggc-maroon: #7D1935;
  --ggc-maroon-deep: #5E1327;
  --ggc-gold: #C89B3C;
  --ggc-tan: #E3D5B8;
  --ggc-tan-line: #D8C9AE;

  display: flex;
  justify-content: center;
  width: 100%;
  padding: 28px 16px;
  box-sizing: border-box;
}

.ggc-outer *,
.ggc-outer *::before,
.ggc-outer *::after {
  box-sizing: border-box;
}

.ggc-wrap {
  width: 100%;
  max-width: 380px;
  background: var(--ggc-paper);
  color: var(--ggc-ink);
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'Segoe UI', Arial, sans-serif;
  border: 1.5px dashed var(--ggc-tan-line);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(43, 27, 20, 0.04), 0 20px 34px -22px rgba(43, 27, 20, 0.45);
  overflow: hidden;
  position: relative;
}

/* --- মাপার ফিতা: গজের ১৬ গিরার দাগ, বর্তমান গিরা মান দেখায় --- */
.ggc-tape {
  background: linear-gradient(180deg, var(--ggc-maroon) 0%, var(--ggc-maroon-deep) 100%);
  padding: 15px 20px 11px;
  position: relative;
}

.ggc-tape-track {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 14px;
}

.ggc-tick {
  width: 1px;
  height: 6px;
  background: rgba(251, 246, 236, 0.32);
}

.ggc-tick-major {
  width: 1.5px;
  height: 11px;
  background: rgba(200, 155, 60, 0.85);
}

.ggc-tape-pin {
  position: absolute;
  bottom: 6px;
  left: 20px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--ggc-gold);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.25);
  transition: left 0.2s ease;
}

/* --- হেডার --- */
.ggc-head {
  padding: 18px 22px 2px;
}

.ggc-title {
  font-family: 'Tiro Bangla', 'Noto Serif Bengali', Georgia, serif;
  font-weight: 400;
  font-size: 21px;
  margin: 0 0 3px;
  color: var(--ggc-maroon-deep);
  letter-spacing: 0.2px;
}

.ggc-hint {
  margin: 0;
  font-size: 12.5px;
  color: #8a7860;
}

/* --- ফর্ম --- */
.ggc-form {
  padding: 14px 22px 4px;
}

.ggc-field {
  margin-bottom: 14px;
}

.ggc-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b5940;
  margin: 0 0 5px;
  letter-spacing: 0.2px;
}

.ggc-input-shell {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--ggc-tan-line);
  border-radius: 6px;
  overflow: hidden;
}

.ggc-input-shell:focus-within {
  border-color: var(--ggc-maroon);
  box-shadow: 0 0 0 3px rgba(125, 25, 53, 0.12);
}

.ggc-input-shell input[type="number"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ggc-ink);
  background: transparent;
}

.ggc-affix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: #9b8a6f;
  background: #f7f1e3;
  border-left: 1px solid var(--ggc-tan-line);
  white-space: nowrap;
}

.ggc-affix-lead {
  border-left: none;
  border-right: 1px solid var(--ggc-tan-line);
  color: var(--ggc-gold);
  font-weight: 700;
}

/* --- বাটন --- */
.ggc-calc-btn {
  width: 100%;
  margin: 6px 0 20px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: var(--ggc-maroon);
  color: var(--ggc-paper);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.ggc-calc-btn:hover {
  background: var(--ggc-maroon-deep);
}

.ggc-calc-btn:active {
  transform: scale(0.99);
}

.ggc-calc-btn:focus-visible {
  outline: 2px solid var(--ggc-gold);
  outline-offset: 2px;
}

/* --- ফলাফল: রসিদের মতো, ছেঁড়ার দাগ দিয়ে আলাদা --- */
.ggc-result {
  margin: 0 22px 20px;
  position: relative;
  padding-top: 18px;
}

.ggc-perforation {
  position: absolute;
  top: 0;
  left: -22px;
  right: -22px;
  height: 1px;
  background-image: radial-gradient(circle, var(--ggc-tan-line) 1.4px, transparent 1.5px);
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

.ggc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13.5px;
  color: #4a3c2c;
}

.ggc-row b {
  font-weight: 600;
  color: var(--ggc-ink);
  white-space: nowrap;
}

.ggc-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--ggc-tan-line);
  font-family: 'Tiro Bangla', 'Noto Serif Bengali', Georgia, serif;
  font-size: 16px;
  align-items: baseline;
}

.ggc-total span {
  color: var(--ggc-maroon-deep);
  font-weight: 600;
}

.ggc-total b {
  color: var(--ggc-maroon);
  font-size: 19px;
}

/* --- এরর --- */
.ggc-error {
  margin: 0 22px 18px;
  padding: 10px 12px;
  background: #fbeceb;
  border: 1px solid #eac2bf;
  border-radius: 6px;
  color: #a3271f;
  font-size: 12.5px;
  line-height: 1.4;
}

.ggc-hidden {
  display: none;
}

@media (max-width: 380px) {
  .ggc-outer {
    padding: 18px 10px;
  }
  .ggc-head,
  .ggc-form {
    padding-left: 18px;
    padding-right: 18px;
  }
  .ggc-result,
  .ggc-error {
    margin-left: 18px;
    margin-right: 18px;
  }
  .ggc-perforation {
    left: -18px;
    right: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ggc-tape-pin,
  .ggc-calc-btn {
    transition: none;
  }
}
