/* Calculator Section */
.calculator-wrapper {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.calculator-card {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calculator-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.calculator-header .calculator-icon {
  font-size: 2.5rem;
  color: #2a5298;
  margin-bottom: 1rem;
}

.calculator-header h2 {
  font-size: 1.8rem;
  color: #2a5298;
}

.input-group {
  margin-bottom: 2rem;
}

.floating-label {
  position: relative;
  display: block;
}

.floating-label input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.floating-label input:focus {
  border-color: #2a5298;
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,82,152,0.1);
}

.floating-label span {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  color: #666;
}

.floating-label input:focus + span,
.floating-label input:not(:placeholder-shown) + span {
  top: 0;
  transform: translateY(-50%) scale(0.9);
  background: white;
  padding: 0 0.5rem;
}

/* Slider Styles */
.allowance-sliders {
  margin-bottom: 2rem;
}

.slider-group {
  margin-bottom: 1.5rem;
}

.slider-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #666;
}

.slider-with-value {
  position: relative;
  padding-top: 1.5rem;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  background: #eee;
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #2a5298;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.slider-value {
  position: absolute;
  left: 0;
  top: 0;
  background: #2a5298;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Nationality Toggle */
.nationality-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.toggle-switch {
  position: relative;
  width: 200px; /* Increased width to accommodate Arabic text */
  height: 40px; /* Increased height */
}

.toggle-switch input {
  display: none;
}

.toggle-switch label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px; /* Increased padding */
  width: 100%;
  height: 100%;
  background: #eaeaea;
  border-radius: 20px;
  cursor: pointer;
  overflow: hidden;
}

.toggle-switch .toggle-label {
  font-size: 14px;
  color: #666;
  z-index: 1;
  transition: color 0.3s ease;
  padding: 0 10px;
}

.toggle-switch input:checked + label .toggle-label:last-child,
.toggle-switch input:not(:checked) + label .toggle-label:first-child {
  color: #fff;
}

.toggle-switch label::before {
  content: "";
  position: absolute;
  width: 50%;
  height: 100%;
  right: 0;
  top: 0;
  background: #2a5298;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

.toggle-switch input:checked + label::before {
  transform: translateX(-100%);
}

/* Add this if you want to adjust the text alignment */
.toggle-switch label {
  text-align: center;
  direction: rtl;
}

/* Optional: Add hover effect */
.toggle-switch:hover label::before {
  background: #1e3c72;
}

/* Results Section */
.results {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.result-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #2a5298;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.result-details h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #666;
}

.amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2a5298;
}

.result-breakdown {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.breakdown-item:last-child {
  border-bottom: none;
}

/* Calculate Button */
.calculate-btn {
  background: #2a5298;
  color: white;
  border: none;
  width: 100%;
  padding: 1.2rem;
  border-radius: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.calculate-btn:hover {
  background: #1e3c72;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .calculator-card {
      padding: 2rem;
  }
  
  .result-cards {
      grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .calculator-card {
      padding: 1.5rem;
  }
  
  .floating-label input {
      font-size: 1rem;
      padding: 0.8rem;
  }
  
  .calculate-btn {
      padding: 1rem;
      font-size: 1.1rem;
  }
}