/* ─── Utility ────────────────────────────────────────────────────────────────── */
.d-none { display: none; }

/* ─── Block Layout ───────────────────────────────────────────────────────────── */
.paint-calculator {
  container-type: inline-size;
}

.sa-calculator {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px;
  font-family: inherit;
}

/* ─── Unit Toggle ────────────────────────────────────────────────────────────── */
.calc-unit-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.measurement-system {
  padding: 8px 20px;
  border: 1px solid #000;
  border-radius: 100px;
  background: transparent;
  color: #000;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.measurement-system.selected {
  background: #000;
  color: #fff;
}

/* ─── Tab Navigation ─────────────────────────────────────────────────────────── */
.tab-selector {
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.tab-selector::-webkit-scrollbar {
  display: none;
}

.tab-selector .list-inline {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.tab-selector .list-inline-item {
  margin: 0;
}

.tab-selector .nav-link {
  display: block;
  padding: 12px 20px;
  color: #666;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tab-selector .nav-link:hover {
  color: #000;
}

.tab-selector .nav-link.active {
  color: #000;
  border-bottom-color: #000;
}

/* ─── Tab Panels ─────────────────────────────────────────────────────────────── */
.tab-content .tab-pane {
  display: none;
}

.tab-content .tab-pane.active {
  display: block;
}

/* ─── Size Selector Dropdown ─────────────────────────────────────────────────── */
._calc_selectSize {
  margin-bottom: 20px;
}

.size-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  color: #000;
  font-size: 14px;
  cursor: pointer;
  min-width: 140px;
}

.dropdown-caret {
  display: inline-block;
  font-size: 10px;
  margin-left: auto;
  transition: transform 0.15s ease;
  transform: rotate(0deg);
}

.dropdown.show .dropdown-caret,
.size-selector[aria-expanded="true"] .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  padding: 4px 0;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #000;
}

.dropdown-item:hover {
  background: #f5f5f5;
}

/* ─── Inputs ─────────────────────────────────────────────────────────────────── */
.calc-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@container (min-width: 500px) {
  .calc-inputs {
    grid-template-columns: repeat(4, 1fr);
  }
}

.calc-input-full {
  grid-column: 1 / -1;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-input-group label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.calc-input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.calc-input:focus {
  outline: 2px solid #000;
  outline-offset: 1px;
  border-color: transparent;
}

.calc-area-display label {
  font-size: 14px;
  color: #333;
}

/* ─── Extras ─────────────────────────────────────────────────────────────────── */
.calc-extras {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.extras {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 100px;
  background: transparent;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.extras.selected {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* ─── Actions ────────────────────────────────────────────────────────────────── */
.calc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.calc-btn-primary {
  padding: 12px 32px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.calc-btn-primary:hover {
  background: transparent;
  color: #000;
}

.calc-btn-secondary {
  padding: 12px 24px;
  background: transparent;
  color: #000;
  border: 1px solid #000;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.calc-btn-secondary:hover {
  background: #000;
  color: #fff;
}

/* ─── Results ────────────────────────────────────────────────────────────────── */
.calc-result-panel {
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
}

.result-coats-requirement {
  background: #f5f5f0;
  border-left: 3px solid #000;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #333;
}

.calc-result-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  margin-top: 0;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 16px;
  background: #f8f8f5;
  border-radius: 4px;
  margin-bottom: 8px;
}

.calc-result-label {
  font-weight: 600;
  font-size: 14px;
}

.calc-result-qty {
  font-size: 14px;
}

.body-copy-2 {
  color: #666;
}

/* ─── Modal Overlay ──────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.3rem;
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.3rem - 1px);
  border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.3rem - 1px);
  border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
}

.btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  opacity: 0.5;
}

.btn-close:hover {
  color: #000;
  text-decoration: none;
  opacity: 0.75;
}

.btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
  }
}

/* ─── Modal Error Message ─────────────────────────────────────── */
.overlay-emailerror_message {
  color: #dc3545;
  font-weight: 600;
}

/* ─── Modal Form Spacing ───────────────────────────────────────── */
.form-meta_info {
  margin-bottom: 1.5rem;
}

.form_row .textarea {
  width: 80%;
}

/* ─── Modal Close Button ───────────────────────────────────────── */
.modal-close-btn {
  filter: invert(100%) sepia(100%) grayscale(100%);
  width: 24px;
  height: 24px;
  cursor: pointer;
}
