/* Gold Deposit Calculator Styles */

.calculator-modal.hidden {
  display: none;
}

.calculator-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.calculator-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.calculator-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.08);
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  -webkit-box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
          box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.calculator-modal-panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.calculator-modal-panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.calculator-modal-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.26);
  border: 2px solid rgba(17, 17, 17, 0.9);
  border-radius: 999px;
}

.calculator-modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.36);
}

.calculator-modal-panel .gold-deposit-calculator {
  padding: 1.5rem;
}

.calculator-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.calculator-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.calculator-modal-close:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gold-deposit-calculator {
  padding: 2rem;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.calculator-grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: (1fr)[3];
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

@media (max-width: 1024px) {
  .calculator-grid {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.calculator-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.column-header {
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 1rem;
  border-bottom: 2px solid #ffffff;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Gold Batches */
.batches-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.batch-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.batch-label {
  width: 50px;
  font-weight: 500;
  font-size: 0.875rem;
}

.batch-input {
  flex: 1;
  padding: 0.5rem;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
}

.batch-input:focus {
  outline: none;
  border-color: #000000;
  -webkit-box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
          box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.batch-unit {
  width: 20px;
  font-size: 0.75rem;
  color: #cccccc;
}

/* Total Weight */
.total-weight-section {
  padding-top: 1rem;
  border-top: 1px solid #333333;
}

.total-weight-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.unit {
  font-size: 0.875rem;
  color: #cccccc;
}

/* Other Materials */
.other-materials-question {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tooltip-wrapper {
  position: relative;
}

.tooltip-button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #ffffff;
  background-color: transparent;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.tooltip-button:hover {
  background-color: #ffffff;
  color: #000000;
}

.tooltip-content {
  display: none;
  position: absolute;
  bottom: 100%;
  width: 200px;
  background-color: #ffffff;
  color: #000000;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  z-index: 10;
  margin-bottom: 0.5rem;
  left: 100%;
  -webkit-transform: translateX(-100%);
          transform: translateX(-100%);
}

.tooltip-button:hover ~ .tooltip-content,
.tooltip-content:hover {
  display: block;
}

.toggle-group {
  display: flex;
  gap: 0.5rem;
  background-color: #111111;
  padding: 0.25rem;
  border-radius: 4px;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  border: none;
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 3px;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background-color: #ffffff;
  color: #000000;
  font-weight: 600;
}

.other-materials-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.other-materials-input.hidden {
  display: none;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#otherMaterialGrams {
  flex: 1;
  padding: 0.5rem;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
}

#otherMaterialGrams:focus {
  outline: none;
  border-color: #000000;
  -webkit-box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
          box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

#tradingFeePercentage {
  flex: 1;
  padding: 0.5rem;
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
}

#tradingFeePercentage:focus {
  outline: none;
  border-color: #000000;
  -webkit-box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
          box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Spot Price Section */
.spot-price-section {
  padding-bottom: 1rem;
  border-bottom: 1px solid #333333;
}

.spot-price-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
}

.spot-price-timestamp {
  margin-top: 0.5rem;
  color: #999999;
}

/* Results Section */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333333;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #222222;
}

.result-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-label {
  font-size: 0.875rem;
  color: #cccccc;
}

.result-value {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: right;
}

.result-net-settlement {
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-top: 0.5rem;
  border-top: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

.result-net-settlement .result-label {
  font-weight: 600;
  color: #ffffff;
}

.result-net-settlement .result-value {
  font-weight: 700;
  font-size: 1.125rem;
}

/* Information Column */
.info-box {
  background-color: #111111;
  padding: 1rem;
  border-radius: 4px;
  line-height: 1.6;
}

.info-box p {
  font-size: 0.875rem;
  margin: 0 0 0.75rem 0;
  color: #cccccc;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.information-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.voima-logo {
  max-width: 70%;
  -ms-grid-row-align: center;
      align-self: center;
}
