/* Calculator Page Styles - Extends main styles.css */
:root {
  --radius-sm: 8px;
}

.calculator-page {
  min-height: 100vh;
  padding: 2.5rem 0;
}

.calc-header {
  text-align: center;
  margin-bottom: 4rem;
}

.calc-header h1 {
  font-size: 2.75rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.calc-header p {
  color: #64748b;
  font-size: 1.15rem;
  max-width: 500px;
  margin: 0 auto;
}

.calc-form {
  max-width: 850px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(25px);
  padding: 3.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.form-group {
  margin-bottom: 2rem;
}

/* Type Selector */
.type-selector {
  display: flex;
  gap: 2rem;
  background: rgba(248, 250, 252, 0.8);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid rgba(59, 130, 246, 0.15);
  transition: all 0.3s ease;
}

.type-radio {
  flex: 1;
  cursor: pointer;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.type-radio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(59, 130, 246, 0.05);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.type-radio:hover::before {
  opacity: 1;
}

.type-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.type-radio input[type="radio"]:checked + span::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px white;
  z-index: 2;
}

.type-radio span {
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: var(--dark);
  font-size: 1.1rem;
  display: block;
  padding-left: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

#courses-section {
  margin-bottom: 3rem;
}

#courses-section h3 {
  margin-bottom: 2rem;
  color: var(--dark);
  font-size: 1.4rem;
  font-weight: 700;
}

.form-sections {
  margin-bottom: 2.5rem;
}

.calc-section {
  display: none;
}

.calc-section.active {
  display: block;
}

.course-row {
  margin-bottom: 1.75rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  border: 2px solid rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.course-row:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr auto;
  gap: 1.5rem;
  align-items: end;
}

.form-row.percentage-row {
  grid-template-columns: 2fr 1.5fr 1fr auto;
}

.form-group.small {
  margin-bottom: 0;
}

.form-group.small input,
.form-group.small select {
  padding: 0.875rem 1rem;
  font-size: 0.98rem;
}

.button-spacing {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.submit-spacing {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.add-btn, .remove-btn {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
  height: fit-content;
  align-self: center;
}

.add-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.remove-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  padding: 0.875rem;
  font-size: 1.3rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  align-self: flex-start;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.remove-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.cta-button.large {
  width: 100%;
  max-width: 300px;
  padding: 1.25rem 2rem;
  font-size: 1.15rem;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 3.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 50px 100px rgba(0,0,0,0.3);
  max-width: 550px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  color: var(--dark);
  font-size: 2rem;
  font-weight: 800;
}

.result-type {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.results-grid {
  display: grid;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: rgba(248, 250, 252, 0.8);
  border-radius: var(--radius);
  border-left: 5px solid rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
}

.result-item:hover {
  transform: translateX(5px);
}

.result-item.highlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(16, 185, 129, 0.12));
  border-left-color: var(--primary);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.result-item label {
  color: #475569;
  font-weight: 600;
  font-size: 1.05rem;
}

.result-item span {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-button {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  transition: all 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(30px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .calc-form {
    padding: 2.5rem 2rem;
    margin: 1rem;
  }
  
  .type-selector {
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .course-row {
    padding: 1.75rem;
  }
  
  .modal-content {
    padding: 2.5rem 2rem;
    margin: 1rem;
  }
}

