/* Partnership Profit Calculator Styles */

.ppc-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.ppc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.ppc-title {
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.15;
}

.ppc-widget-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  color: #1e88e5;
}

.ppc-widget-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ppc-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.ppc-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.ppc-calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

/* Left Section - Inputs */
.ppc-left-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ppc-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ppc-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
}

.ppc-input-wrapper {
  /* use grid so the currency sits in its own column and the input never scrolls underneath it */
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.ppc-currency {
  position: relative;
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  pointer-events: none;
  padding-left: 4px;
}

.ppc-input {
  width: 100%;
  /* normal padding now that currency is outside the input content area */
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1a1a1a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.ppc-input:focus {
  outline: none;
  border-color: #1e88e5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.ppc-input:hover {
  border-color: #9ca3af;
}

/* Slider */
.ppc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ppc-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ppc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  transition: background 0.2s ease;
}

.ppc-slider:hover {
  background: #d1d5db;
}

.ppc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e88e5;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.ppc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(30, 136, 229, 0.4);
}

.ppc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e88e5;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.ppc-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(30, 136, 229, 0.4);
}

.ppc-slider-value {
  font-size: 16px;
  font-weight: 600;
  color: #1e88e5;
  min-width: 50px;
  text-align: right;
}

/* Right Section - Results */
.ppc-right-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ppc-result-card {
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.ppc-result-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ppc-card-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 8px;
}

.ppc-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e88e5;
  line-height: 1;
  transition: all 0.3s ease;
}

.ppc-annual-card {
  /* softer default gradient; can be overridden by Elementor style control */
  background: linear-gradient(
    135deg,
    rgba(30, 136, 229, 0.95) 0%,
    rgba(21, 101, 192, 0.95) 100%
  );
  border: none;
  margin-top: 8px;
}

.ppc-annual-card .ppc-card-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.ppc-annual-card .ppc-value {
  color: #ffffff;
  font-size: 36px;
}

/* Note */
.ppc-note {
  padding: 16px 20px;
  background: #eff6ff;
  border-left: 4px solid #1e88e5;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
}

.ppc-note strong {
  font-weight: 600;
  color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
  .ppc-container {
    padding: 24px;
  }

  .ppc-title {
    font-size: 24px;
  }

  .ppc-subtitle {
    font-size: 14px;
  }

  .ppc-calculator {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ppc-value {
    font-size: 28px;
  }

  .ppc-annual-card .ppc-value {
    font-size: 32px;
  }

  .ppc-slider-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .ppc-slider-value {
    text-align: center;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .ppc-container {
    padding: 20px;
  }

  .ppc-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .ppc-title-wrap {
    align-items: center;
    text-align: center;
  }

  .ppc-widget-icon {
    width: 40px;
    height: 40px;
  }

  .ppc-title {
    font-size: 22px;
  }

  .ppc-result-card {
    padding: 20px;
  }

  .ppc-value {
    font-size: 24px;
  }

  .ppc-annual-card .ppc-value {
    font-size: 28px;
  }
}

/* Animation for value changes */
@keyframes valueChange {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.ppc-value.updating {
  animation: valueChange 0.3s ease;
}

/* Loading State */
.ppc-container.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Focus States for Accessibility */
.ppc-slider:focus {
  outline: 2px solid #1e88e5;
  outline-offset: 2px;
}

.ppc-input:focus-visible {
  outline: 2px solid #1e88e5;
  outline-offset: 2px;
}

/* Remove number input arrows for cleaner look (optional) */
.ppc-input::-webkit-outer-spin-button,
.ppc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ppc-input[type="number"] {
  -moz-appearance: textfield;
}
