/* Enhanced Quote Form and Calculators Styles */

/* ===== Calculator Cards ===== */
.calculator-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 0;
  margin-bottom: 30px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.calculator-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.calculator-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.maritime-calculator .calculator-header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.calculator-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  backdrop-filter: blur(10px);
}

.calculator-icon i {
  font-size: 32px;
  color: #ffffff;
}

.calculator-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
}

.calculator-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  margin: 0;
}

.calculator-body {
  padding: 30px;
}

.form-label-calculator {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label-calculator i {
  font-size: 14px;
  color: #667eea;
}

.form-control-calculator {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.form-control-calculator:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #ffffff;
}

.form-control-calculator::placeholder {
  color: #cbd5e0;
}

/* Calculator Actions */
.calculator-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.btn-calculate {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.maritime-calculator .btn-calculate {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-reset {
  background: #f7fafc;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-reset:hover {
  background: #ffffff;
  border-color: #cbd5e0;
}

/* Calculator Results */
.calculator-result {
  margin-top: 30px;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #e2e8f0;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.result-header i {
  font-size: 24px;
  color: #48bb78;
}

.result-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.result-item.total {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.result-item.total .result-label,
.result-item.total .result-value {
  color: #ffffff;
}

.result-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
}

.result-value {
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
}

.result-value.highlight {
  color: #667eea;
  font-size: 18px;
}

.result-note {
  margin-top: 15px;
  padding: 12px 15px;
  background: #ffffff;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.result-note i {
  color: #667eea;
  font-size: 16px;
  margin-top: 2px;
}

.result-note small {
  color: #718096;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== Enhanced Quote Form ===== */
.quote-form-enhanced {
  padding: 20px 0;
}

.quote-form-enhanced .form-group {
  margin-bottom: 25px;
}

.quote-form-enhanced .form-label {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quote-form-enhanced .form-label i {
  font-size: 16px;
  color: #667eea;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .icon-input {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 18px;
  pointer-events: none;
  z-index: 1;
}

.input-with-icon .form-control,
.input-with-icon select {
  padding-left: 48px;
}

.quote-form-enhanced .form-control,
.quote-form-enhanced select {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.quote-form-enhanced .form-control:focus,
.quote-form-enhanced select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: #ffffff;
  outline: none;
}

.quote-form-enhanced .form-control.is-invalid {
  border-color: #f56565;
  background: #fff5f5;
}

.quote-form-enhanced .form-control.is-valid {
  border-color: #48bb78;
  background: #f0fff4;
}

.quote-form-enhanced .invalid-feedback {
  color: #f56565;
  font-size: 13px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.quote-form-enhanced .invalid-feedback::before {
  content: "⚠";
  font-size: 14px;
}

.dimension-input {
  position: relative;
}

.dimension-input .form-control {
  padding-right: 15px;
}

.dimension-label {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #a0aec0;
  font-weight: 600;
  pointer-events: none;
}

.quote-form-enhanced textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.quote-form-enhanced .text-muted {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 6px;
  display: block;
}

.quote-form-enhanced .btn-brand-1-big {
  transition: all 0.3s ease;
}

.quote-form-enhanced .btn-brand-1-big:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.quote-form-enhanced .btn-brand-1-big:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .calculator-card {
    margin-bottom: 20px;
  }

  .calculator-header {
    padding: 25px 20px;
  }

  .calculator-body {
    padding: 20px;
  }

  .calculator-icon {
    width: 60px;
    height: 60px;
  }

  .calculator-icon i {
    font-size: 28px;
  }

  .calculator-title {
    font-size: 20px;
  }

  .calculator-actions {
    flex-direction: column;
  }

  .btn-calculate,
  .btn-reset {
    width: 100%;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .result-value {
    font-size: 18px;
  }

  .quote-form-enhanced .row {
    margin-left: 0;
    margin-right: 0;
  }

  .quote-form-enhanced .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ===== Additional Enhancements ===== */
.mr-2 {
  margin-right: 8px;
}

.gx-3 > .col-md-4,
.gx-3 > .col-md-6 {
  padding-left: 8px;
  padding-right: 8px;
}

/* Fix for select appearance */
.quote-form-enhanced select,
.form-control-calculator {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

/* Animation for form submission */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.quote-form-enhanced .btn-brand-1-big:active {
  animation: pulse 0.5s;
}
