/*==================================================
 BuildCostMate - Concrete Calculator
==================================================*/

/* ===== Thickness Labels ===== */
.thickness-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.thickness-labels label:first-child {
  width: 70%;
}

.thickness-labels label:last-child {
  width: 25%;
  text-align: left;
}

.thickness-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.thickness-row input {
  flex: 3;
}

.thickness-row select {
  flex: 1;
}

/* ===== Custom Ratio ===== */
.custom-row {
  display: flex;
  gap: 12px;
}

.custom-row div {
  flex: 1;
}

.custom-row label {
  text-align: center;
  margin-bottom: 6px;
}

.custom-row input {
  text-align: center;
}

/* ===== Sankra Checkbox ===== */
.sankra-option {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sankra-option input {
  width: 22px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #000;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}

.sankra-option input:checked {
  background: #087dec;
}

.sankra-option label {
  margin: 0;
  cursor: pointer;
}

/* ============================================================
   RESULTS – COMPLETE OVERRIDE (No style.css conflict)
   ============================================================ */

#resultWrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#resultContent {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Override the global input/select/button width:100% */
#resultContent input,
#resultContent select,
#resultContent button,
.result-card input,
.result-card select,
.result-card button {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.result-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr 1fr !important;
  gap: 15px !important;
  margin-top: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.result-card {
  background: rgba(0, 0, 0, 0.1) !important;
  padding: 15px 10px !important;
  border-radius: 8px !important;
  text-align: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.result-card .label {
  font-size: 13px !important;
  color: #aaa !important;
  display: block !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

.result-card .value {
  font-size: 22px !important;
  font-weight: bold !important;
  display: block !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
}

.result-card .unit {
  font-size: 12px !important;
  color: #aaa !important;
  display: block !important;
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: 2 columns */
@media (max-width: 470px) {
  .result-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
}

/* Phone: Vertical stack */
@media (max-width: 250px) {
  #resultWrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  #resultContent {
    width: 100% !important;
    max-width: 100% !important;
  }

  .result-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    grid-template-columns: none !important;
  }

  .result-card {
    width: 100% !important;
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  .result-card .value {
    font-size: 20px !important;
  }

  .result-card .label {
    font-size: 12px !important;
  }

  .result-card .unit {
    font-size: 11px !important;
  }

  .thickness-row {
    flex-direction: row !important;
  }

  .custom-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* Extra small phones */
@media (max-width: 380px) {
  .result-card {
    padding: 10px 6px !important;
  }

  .result-card .value {
    font-size: 18px !important;
  }

  .result-card .label {
    font-size: 11px !important;
  }

  .result-card .unit {
    font-size: 10px !important;
  }
}/* ============================================
   BRICK CALCULATOR - BuildCostMate
   ============================================ */

/* ===== Mode Toggle ===== */
.mode-toggle {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
  padding: 8px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.mode-toggle button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s;
  background: transparent;
  color: #aaa;
}

.mode-toggle button.active {
  background: #00aaff;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
}

.mode-toggle button:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Advanced Inputs ===== */
.advanced-inputs {
  display: none;
}

.advanced-inputs.show {
  display: block;
}

/* ===== Wall Details ===== */
.wall-details-card {
  padding: 15px !important;
}

.wall-details-row {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  margin-top: 8px;
}

.wall-detail-item {
  flex: 1;
  min-width: 0;
}

.wall-detail-item label {
  margin-top: 0;
  font-size: 13px;
  color: #ccc;
}

.wall-detail-item input,
.wall-detail-item select {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: white;
  color: #333;
  font-size: 15px;
  transition: border-color 0.3s;
}

.wall-detail-item input:focus,
.wall-detail-item select:focus {
  outline: none;
  border-color: #2a5f8f;
  box-shadow: 0 0 8px rgba(42, 95, 143, 0.25);
}

/* ===== Deduction Row ===== */
.deduction-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.deduction-field {
  flex: 1;
  min-width: 80px;
}

.deduction-field label {
  margin-top: 0;
  font-size: 12px;
  color: #ccc;
}

.deduction-field input,
.deduction-field select {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: white;
  color: #333;
  font-size: 14px;
}

.deduction-field input:focus,
.deduction-field select:focus {
  outline: none;
  border-color: #2a5f8f;
  box-shadow: 0 0 8px rgba(42, 95, 143, 0.25);
}

.deduction-add {
  flex: 0.5;
  min-width: 70px;
}

.deduction-add button {
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  background: #ff9800;
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.deduction-add button:hover {
  background: #e68900;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.ded-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin-top: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.ded-item .ded-text {
  font-size: 14px;
  color: #fff;
}

.ded-item .del {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.ded-item .del:hover {
  background: #c82333;
  transform: scale(1.05);
}

/* ===== Advanced Walls ===== */
.adv-wall-group {
  background: rgba(0, 0, 0, 0.08);
  padding: 12px;
  border-radius: 8px;
  margin-top: 8px;
}

.adv-wall-group .wall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.adv-wall-group .wall-header h4 {
  margin: 0;
  color: #fff;
}

.adv-wall-group .wall-header button {
  width: auto;
  padding: 4px 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.adv-wall-group .wall-inputs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.adv-wall-group .wall-input-item {
  flex: 1;
  min-width: 100px;
}

.adv-wall-group .wall-input-item label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 3px;
}

.adv-wall-group .wall-input-item input,
.adv-wall-group .wall-input-item select {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: white;
  color: #333;
  font-size: 14px;
}

.adv-wall-group .wall-input-item input:focus,
.adv-wall-group .wall-input-item select:focus {
  outline: none;
  border-color: #2a5f8f;
}

.adv-wall-group .wall-similar {
  flex: 0.7;
  min-width: 80px;
}

/* ===== Collapse Header ===== */
.collapse-header {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
}

.collapse-content {
  display: none;
  margin-top: 10px;
}

/* ===== Results ===== */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.result-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.result-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.result-card {
  background: rgba(0, 0, 0, 0.1);
  padding: 15px 10px;
  border-radius: 8px;
  text-align: center;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.result-card .label {
  font-size: 13px;
  color: #aaa;
  display: block;
}

.result-card .value {
  font-size: 22px;
  font-weight: bold;
  display: block;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.result-card .unit {
  font-size: 11px;
  color: #aaa;
  display: block;
}

/* ===== Sankra Option ===== */
.sankra-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.sankra-option input {
  width: 22px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #000;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}

.sankra-option input:checked {
  background: #087dec;
}

.sankra-option label {
  margin: 0;
  cursor: pointer;
}

/* ===== Wall Deduction List ===== */
.adv-wall-ded-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  margin-top: 2px;
}

.adv-wall-ded-item span {
  font-size: 12px;
  color: #ddd;
}

.adv-wall-ded-item button {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0 8px;
  cursor: pointer;
}

/* ===== Wall List ===== */
.wall-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 5px;
  margin-top: 4px;
}

.wall-list-item span {
  font-size: 13px;
  color: #ddd;
}

.wall-list-item button {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 14px;
}

.wall-list-item button:hover {
  background: #c82333;
}

