/*
BACANCY COMMISSION CALCULATOR - DIRECT INTEGRATION STYLES  
========================================================

This file contains CSS styles for the direct integration version of the calculator.

CUSTOMIZATION INSTRUCTIONS:
- Modify CSS custom properties below to match your brand colors
- Adjust component spacing by changing padding/margin values
- Customize typography by modifying font properties
- Add responsive breakpoints as needed
- Override specific components by targeting their classes

USAGE:
This CSS is automatically loaded when you use the [bacancy_calculator_direct] shortcode
*/

/* CSS Custom Properties for Brand Customization */
:root {
  --bc-primary: #F48323; /* Primary brand color (emerald green) */
  --bc-primary-hover: #059669; /* Primary color on hover */
  --bc-secondary: #1f2937; /* Secondary text color (dark gray) */
  --bc-muted: #6b7280; /* Muted text color (medium gray) */
  --bc-border: #e5e7eb; /* Border color (light gray) */
  --bc-background: #ffffff; /* Background color */
  --bc-card-bg: #ffffff; /* Card background */
  --bc-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Box shadow */
  --bc-radius: 8px; /* Border radius */
  --bc-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Main Calculator Container */
.bacancy-calculator-wp {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  font-family: var(--bc-font-family);
  color: var(--bc-secondary);
  line-height: 1.6;
}

/* Calculator Header */
.calculator-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bc-border);
}

.calculator-header h2 {
  color: var(--bc-secondary);
  margin: 0 0 0.5rem 0;
  font-size: 3rem;
  font-weight: 700;
}

.calculator-header p {
  color: var(--bc-muted);
  margin: 0;
  font-size: 1.1rem;
}

/* Tab Navigation */
.calculator-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--bc-border);
  background: #f9fafb;
  border-radius: var(--bc-radius) var(--bc-radius) 0 0;
  overflow: hidden;
}

.tab-button {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bc-muted);
}

.tab-button:hover {
  background: rgba(16, 185, 129, 0.05);
  color: var(--bc-primary);
}

.tab-button.active {
  border-bottom-color: var(--bc-primary);
  color: var(--bc-primary);
  background: var(--bc-background);
}

/* Calculator Content Areas */
.calculator-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.calculator-content.active {
  display: block;
}

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

/* Calculator Cards */
.calculator-card {
  background: var(--bc-card-bg);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  padding: 2rem;
  box-shadow: var(--bc-shadow);
  margin-bottom: 1rem;
}

.calculator-card h3 {
  color: var(--bc-secondary);
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.calculator-card > p {
  color: var(--bc-muted);
  margin: 0 0 2rem 0;
}

/* Form Groups */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--bc-secondary);
  font-size: 1rem;
}

/* Toggle Switch for Project Type */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle-label {
  font-size: 0.9rem;
  color: var(--bc-muted);
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--bc-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(30px);
}

/* Range Sliders */
.range-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bc-border);
  outline: none;
  -webkit-appearance: none;
  margin: 1rem 0;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bc-primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  background: var(--bc-primary-hover);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bc-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Range Labels */
.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--bc-muted);
}

/* Results Section */
.results {
  border-top: 1px solid var(--bc-border);
  padding-top: 2rem;
  margin-top: 2rem;
}

.results h4 {
  color: var(--bc-secondary);
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Earnings Display */
.earnings-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.earnings-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.commission-label {
  font-size: 0.875rem;
  color: var(--bc-muted);
  font-weight: 500;
}

.commission-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bc-primary);
  line-height: 1;
}

.per-month {
  font-size: 0.875rem;
  color: var(--bc-muted);
  align-self: flex-end;
  margin-bottom: 0.5rem;
}

/* Progress Container */
.progress-container {
  margin-top: 1rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--bc-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bc-primary), var(--bc-primary-hover));
  transition: width 0.4s ease;
  border-radius: 6px;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--bc-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .bacancy-calculator-wp {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .calculator-card {
    padding: 1.5rem;
  }

  .calculator-header h2 {
    font-size: 1.75rem;
  }

  .commission-amount {
    font-size: 2rem;
  }

  .earnings-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .per-month {
    align-self: flex-start;
    margin-bottom: 0;
  }
}

@media (max-width: 480px) {
  .calculator-tabs {
    flex-direction: column;
  }

  .tab-button {
    border-bottom: 1px solid var(--bc-border);
    border-right: none;
  }

  .tab-button.active {
    border-bottom-color: var(--bc-border);
    border-left: 3px solid var(--bc-primary);
  }

  .calculator-card {
    padding: 1rem;
  }

  .toggle-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* WordPress Theme Compatibility */
.bacancy-calculator-wp * {
  box-sizing: border-box;
}

.bacancy-calculator-wp button {
  font-family: inherit;
}

.bacancy-calculator-wp input[type="range"] {
  margin: 1rem 0;
}

/*
CUSTOM BRAND STYLING
===================
Add your custom styles below to override defaults and match your brand
*/

/* Example: Custom brand colors
.bacancy-calculator-wp {
    --bc-primary: #your-primary-color;
    --bc-secondary: #your-secondary-color;
}
*/

/* Example: Custom typography
.bacancy-calculator-wp {
    --bc-font-family: 'Your Custom Font', sans-serif;
}
*/
