:root {
  --fs-26-60: clamp(26px, 2.5297vw + 11.43px, 60px) !important;
  --fs-20-42: clamp(20px, 1.636vw + 10.5766px, 42px) !important;
  --fs-16-32: clamp(16px, 9.15px + 1.19vw, 32px) !important;
  --fs-12-24: clamp(12px, 6.8576px + 0.8928vw, 24px) !important;
  --fs-12-20: clamp(12px, 0.595vw + 8.57px, 20px) !important;
  --fs-12-18: clamp(12px, 0.44vw + 9.43px, 18px) !important;
  --fs-12-16: clamp(12px, 10.29px + 0.297vw, 16px) !important;
  --fs-10-16: clamp(10px, 8.525px + 0.3703vw, 16px) !important;
  --primary-bg: #f5f4ed;
  --secondary-bg: #ffc62f;
}

.tools-parent-container {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-bg);
  color: #333;
  line-height: 1.6;
}

.tools-parent-container .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--fs-12-24);
}
.tools-parent-container .header {
  text-align: center;
  margin-bottom: var(--fs-12-24);
}
.tools-parent-container .header h1 {
  font-size: var(--fs-26-60);
  color: #333;
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .header p {
  font-size: var(--fs-12-18);
  color: #555;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--fs-10-16);
}
.tools-parent-container .main-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--fs-12-24);
  margin-bottom: var(--fs-12-24);
}
.tools-parent-container .calculator-section,
.tools-parent-container .info-section {
  background: white;
  padding: var(--fs-12-24);
  border-radius: var(--fs-10-16);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 3px solid var(--secondary-bg);
}
.tools-parent-container .calculator-section h2,
.tools-parent-container .info-section h2 {
  font-size: var(--fs-20-42);
  color: #333;
  margin-bottom: var(--fs-12-20);
  text-align: center;
}
.tools-parent-container .form-group {
  margin-bottom: var(--fs-12-20);
}
.tools-parent-container .form-group label {
  display: block;
  font-size: var(--fs-12-18);
  font-weight: 600;
  margin-bottom: var(--fs-10-16);
  color: #333;
}
.tools-parent-container .form-group select,
.tools-parent-container .form-group input {
  width: 100%;
  padding: var(--fs-10-16);
  font-size: var(--fs-12-16);
  border: 2px solid var(--secondary-bg);
  border-radius: var(--fs-10-16);
  background: var(--primary-bg);
  transition: all 0.3s ease;
}
.tools-parent-container .form-group select:focus,
.tools-parent-container .form-group input:focus {
  outline: none;
  border-color: #e6b02a;
  box-shadow: 0 0 0 3px rgba(255, 198, 47, 0.2);
}
.tools-parent-container .calculate-btn {
  width: 100%;
  padding: var(--fs-12-16);
  font-size: var(--fs-12-20);
  font-weight: 600;
  background: var(--secondary-bg);
  color: #333;
  border: none;
  border-radius: var(--fs-10-16);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: var(--fs-10-16);
}
.tools-parent-container .calculate-btn:hover:not(:disabled) {
  background: #e6b02a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 198, 47, 0.4);
}
.tools-parent-container .calculate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.tools-parent-container .info-section {
  overflow-y: auto;
  max-height: 800px;
}
.tools-parent-container .info-section h3 {
  font-size: var(--fs-16-32);
  color: #333;
  margin-top: var(--fs-12-20);
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .info-section h4 {
  font-size: var(--fs-12-20);
  color: #333;
  margin-top: var(--fs-12-16);
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .info-section p,
.tools-parent-container .info-section ul {
  font-size: var(--fs-12-16);
  color: #555;
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .info-section ul {
  padding-left: var(--fs-12-20);
}
.tools-parent-container .info-section li {
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  overflow: hidden;
}
.tools-parent-container .modal-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
.tools-parent-container .modal {
  background: white;
  border-radius: var(--fs-12-16);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 4px solid var(--secondary-bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.tools-parent-container .modal-header {
  background: var(--secondary-bg);
  padding: var(--fs-12-20);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tools-parent-container .modal-header h2 {
  font-size: var(--fs-20-42);
  color: #333;
  margin: 0;
}
.tools-parent-container .close-btn {
  background: #333;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: var(--fs-12-20);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tools-parent-container .close-btn:hover {
  background: #555;
  transform: rotate(90deg);
}
.tools-parent-container .modal-content {
  padding: var(--fs-12-24);
}
.tools-parent-container .result-section {
  margin-bottom: var(--fs-12-20);
}
.tools-parent-container .result-section h3 {
  font-size: var(--fs-16-32);
  color: #333;
  margin-bottom: var(--fs-12-16);
  padding: var(--fs-10-16);
  background: var(--primary-bg);
  border-left: 5px solid var(--secondary-bg);
}
.tools-parent-container .result-item {
  background: var(--primary-bg);
  padding: var(--fs-12-16);
  margin-bottom: var(--fs-12-16);
  border-radius: var(--fs-10-16);
  border-left: 4px solid var(--secondary-bg);
}
.tools-parent-container .result-item h4 {
  font-size: var(--fs-12-20);
  color: #333;
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .result-item p {
  font-size: var(--fs-12-16);
  color: #555;
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .result-value {
  font-size: var(--fs-16-32);
  font-weight: bold;
  color: #333;
  margin-bottom: var(--fs-10-16);
}
.tools-parent-container .result-status {
  display: inline-block;
  padding: var(--fs-10-16);
  background: var(--secondary-bg);
  border-radius: var(--fs-10-16);
  font-size: var(--fs-12-16);
  font-weight: 600;
  margin-top: var(--fs-10-16);
}
.tools-parent-container .modal-actions {
  display: flex;
  gap: var(--fs-12-16);
  margin-top: var(--fs-12-20);
  flex-wrap: wrap;
}
.tools-parent-container .download-btn,
.tools-parent-container .clear-btn {
  flex: 1;
  min-width: 200px;
  padding: var(--fs-12-16);
  font-size: var(--fs-12-18);
  font-weight: 600;
  border: none;
  border-radius: var(--fs-10-16);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tools-parent-container .download-btn {
  background: var(--secondary-bg);
  color: #333;
}
.tools-parent-container .download-btn:hover {
  background: #e6b02a;
  transform: translateY(-2px);
}
.tools-parent-container .clear-btn {
  background: #ff6b6b;
  color: white;
}
.tools-parent-container .clear-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
}
.tools-parent-container .toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: var(--fs-12-16);
  border-radius: var(--fs-10-16);
  font-size: var(--fs-12-16);
  z-index: 10000;
  transition: bottom 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.tools-parent-container .toast.show {
  bottom: var(--fs-12-24);
}
.tools-parent-container .formula-box {
  background: #fff9e6;
  padding: var(--fs-12-16);
  border-radius: var(--fs-10-16);
  border: 2px dashed var(--secondary-bg);
  margin: var(--fs-12-16) 0;
  font-family: "Courier New", monospace;
  font-size: var(--fs-12-16);
}
@media (max-width: 1024px) {
  .tools-parent-container .main-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .tools-parent-container .modal {
    width: 95%;
    max-height: 95vh;
  }
  .tools-parent-container .modal-actions {
    flex-direction: column;
  }
  .tools-parent-container .download-btn,
  .tools-parent-container .clear-btn {
    min-width: 100%;
  }
}
@media (max-width: 480px) {
  .tools-parent-container .container {
    padding: var(--fs-10-16);
  }
  .tools-parent-container .calculator-section,
  .tools-parent-container .info-section {
    padding: var(--fs-12-16);
  }
}
.tools-parent-container {
  /* Scrollbar Styling */
}
.tools-parent-container .modal::-webkit-scrollbar,
.tools-parent-container .info-section::-webkit-scrollbar {
  width: 8px;
}
.tools-parent-container .modal::-webkit-scrollbar-track,
.tools-parent-container .info-section::-webkit-scrollbar-track {
  background: var(--primary-bg);
}
.tools-parent-container .modal::-webkit-scrollbar-thumb,
.tools-parent-container .info-section::-webkit-scrollbar-thumb {
  background: var(--secondary-bg);
  border-radius: 4px;
}
.tools-parent-container .modal::-webkit-scrollbar-thumb:hover,
.tools-parent-container .info-section::-webkit-scrollbar-thumb:hover {
  background: #e6b02a;
}
.tools-parent-container input[type=number]::-webkit-inner-spin-button,
.tools-parent-container input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tools-parent-container input[type=number] {
  -moz-appearance: textfield;
}
.tools-parent-container .input-wrapper {
  position: relative;
}
.tools-parent-container .input-wrapper input {
  padding-right: 35px;
}
.tools-parent-container .range-warning {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: #ff6b6b;
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
}
.tools-parent-container .range-warning.show {
  display: flex;
}
.tools-parent-container .tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}
.tools-parent-container .tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border: 5px solid transparent;
  border-top-color: #333;
}
.tools-parent-container .range-warning:hover .tooltip {
  opacity: 1;
}
.tools-parent-container .form-group input.invalid {
  border-color: #ff6b6b;
}