/**
 * CMT Calculator Frontend Styles
 * All styling for the multi-step calculator interface
 *
 * NOTE: This file is in plain CSS for easy editing by non-technical staff.
 * No compilation required - changes take effect after clearing cache.
 */

.yk-calculator-block {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  --calculator-primary: var(--wp--preset--color--yk-secondary);
  --calculator-success: var(--wp--preset--color--yk-primary);
  --calculator-danger: #ef4444;
  --calculator-border: #e5e7eb;
  --calculator-gray-50: #f9fafb;
  --calculator-gray-600: #6b7280;
  --calculator-gray-900: #111827;
}

.yk-calculator-block .calculator-header {
  text-align: center;
  margin-bottom: 3rem;
}

.yk-calculator-block .calculator-header .calculator-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--calculator-gray-900);
  margin-bottom: 0.5rem;
}

.yk-calculator-block .calculator-header .calculator-description {
  font-size: 1.125rem;
  color: var(--calculator-gray-600);
}

.yk-calculator-block .calculator-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 0px solid var(--calculator-border);
}

.yk-calculator-block .calculator-progress .progress-step {
  display: flex;
  align-items: center;
}

.yk-calculator-block .calculator-progress .progress-step .step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: var(--wp--preset--font-size--small) !important;
  background: var(--calculator-border);
  color: var(--calculator-gray-600);
  transition: all 0.3s ease;
}

.yk-calculator-block .calculator-progress .progress-step .step-number.active {
  background: var(--calculator-primary);
  color: white;
  box-shadow: 0 4px 6px rgba(179, 180, 112, 0.3);
}

.yk-calculator-block
  .calculator-progress
  .progress-step
  .step-number.completed {
  background: var(--calculator-success);
  color: white;
}

.yk-calculator-block .calculator-progress .progress-step .step-connector {
  flex: 1;
  height: 2px;
  background: var(--calculator-border);
  margin: 0 1rem;
  transition: background 0.3s ease;
}

.yk-calculator-block
  .calculator-progress
  .progress-step
  .step-connector.completed {
  background: var(--calculator-success);
}

.yk-calculator-block .calculator-form-card {
  background: white;
  border: 1px solid var(--calculator-border);
  border-radius: 0rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yk-calculator-block .calculator-form-card .form-step {
  animation: fadeIn 0.3s ease-in-out;
}

.yk-calculator-block .audit-type-selection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.yk-calculator-block .audit-type-selection .audit-type-card {
  border: 2px solid var(--calculator-border);
  border-radius: 5px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.yk-calculator-block .audit-type-selection .audit-type-card:hover {
  border-color: var(--calculator-primary);
  box-shadow: 0 2px 4px rgba(179, 180, 112, 0.1);
}

.yk-calculator-block .audit-type-selection .audit-type-card.selected {
  border-color: var(--calculator-primary);
  background: #b3b4701f;
  box-shadow: 0 0 0 3px rgba(179, 180, 112, 0.1);
}

.yk-calculator-block .audit-type-selection .audit-type-card h4 {
  font-size: var(--wp--preset--font-size--small) !important;
  font-weight: 600;
  color: var(--calculator-gray-900);
  margin: 0 0 0.5rem 0;
}

.yk-calculator-block .audit-type-selection .audit-type-card p {
  font-size: 0.875rem;
  color: var(--calculator-gray-600);
  margin: 0;
}

.yk-calculator-block .user-info-fields {
  display: grid;
  gap: 1rem;
}

.yk-calculator-block .user-info-fields .form-field label {
  display: block;
  font-weight: 500;
  font-size: var(--wp--preset--font-size--small);
  color: var(--calculator-gray-900);
  margin-bottom: 0rem;
}

.yk-calculator-block .user-info-fields .form-field input {
  width: 100%;
  padding: 0.25rem 0;
  border: none;
  border-bottom: 2px solid var(--calculator-border);
  font-size: 1rem;
  color: var(--calculator-gray-900);
  transition: border-color 0.2s ease;
  background: transparent;
}

.yk-calculator-block .user-info-fields .form-field input:focus {
  outline: none;
  border-bottom-color: var(--calculator-primary);
}

.yk-calculator-block .user-info-fields .form-field input.error {
  border-bottom-color: var(--calculator-danger);
}

.yk-calculator-block .user-info-fields .form-field input::placeholder {
  color: var(--calculator-gray-600);
  opacity: 0.5;
}

.yk-calculator-block .user-info-fields .form-field .error-message {
  color: var(--calculator-danger);
  font-size: var(--wp--preset--font-size--small);
  margin-top: 0.25rem;
}

.yk-calculator-block .calculator-questions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.yk-calculator-block .calculator-questions .question-field label {
  display: block;
  font-size: var(--wp--preset--font-size--small);
  color: var(--calculator-gray-900);
  margin-bottom: 0.5rem;
  font-family: 'akkurat-bold', sans-serif;
}

.yk-calculator-block .calculator-questions .question-field select {
  width: 100%;
  padding: 0.75rem 2rem 0.75rem 0;
  border: none;
  border-bottom: 2px solid var(--calculator-border);
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--yk-primary) !important;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color 0.2s ease;
}

.yk-calculator-block .calculator-questions .question-field select:focus {
  outline: none;
  border-bottom-color: var(--calculator-primary);
}

.yk-calculator-block .calculator-questions .question-field select.error {
  border-bottom-color: var(--calculator-danger);
}

.yk-calculator-block .calculator-questions .question-field .error-message {
  color: var(--calculator-danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Hide result card on Step 3 (Submit/Review screen) */
.yk-calculator-block .calculator-form-card .result-card {
  display: none;
}

/* Show result card on Thank You screen */
.yk-calculator-block .calculator-success-message .result-card {
  background: linear-gradient( 135deg, var(--calculator-success) 0%, rgba(92,80,120,0.76) 100%);
  border-radius: 0px;
  padding: 2rem;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(92,80,120, 0.2);
}

.yk-calculator-block .calculator-success-message .result-card .fee-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.yk-calculator-block .calculator-success-message .result-card .fee-amount {
  font-size: var(--wp--preset--font-size--medium);
  font-weight: bold;
  line-height: 1.2;
}

/* Legacy selector for backwards compatibility */
.yk-calculator-block .calculator-results .result-card {
  background: linear-gradient(
    135deg,
    var(--calculator-success) 0%,
    #B3B470 100%
  );
  border-radius: 5px;
  padding: 2rem;
  color: white;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.yk-calculator-block .calculator-results .result-card .fee-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.yk-calculator-block .calculator-results .result-card .fee-amount {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1.2;
}

/* Fee details section removed - score and scenario no longer displayed on UI */

.yk-calculator-block .calculator-results .summary-section {
  background: var(--calculator-gray-50);
  border-radius: 5px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.yk-calculator-block .calculator-results .summary-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--calculator-gray-900);
  margin: 0 0 1rem 0;
  font-family: var(--wp--preset--font-family--body);
}

.yk-calculator-block .calculator-results .summary-section .summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--calculator-border);
  font-size: 0.875rem;
}

.yk-calculator-block
  .calculator-results
  .summary-section
  .summary-item:last-child {
  border-bottom: none;
}

.yk-calculator-block
  .calculator-results
  .summary-section
  .summary-item
  span:first-child {
  font-weight: 500;
  color: var(--calculator-gray-600);
}

.yk-calculator-block
  .calculator-results
  .summary-section
  .summary-item
  span:last-child {
  color: var(--calculator-gray-900);
}

/* Next steps section removed - follow-up language no longer displayed */

.yk-calculator-block .calculator-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 0;
}

.yk-calculator-block .calculator-navigation button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.025em;
}

.yk-calculator-block .calculator-navigation button.btn-back {
  background: #6b7280;
  color: white;
}

.yk-calculator-block
  .calculator-navigation
  button.btn-back:hover:not(:disabled) {
  background: #4b5563;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.yk-calculator-block .calculator-navigation button.btn-back:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.yk-calculator-block .calculator-navigation button.btn-next {
  background: var(--calculator-primary);
  color: white;
}

.yk-calculator-block .calculator-navigation button.btn-next:hover {
  background: rgb(92 80 120 / 76%);
  box-shadow: 0 2px 4px rgba(92, 80, 120, 0.3);
}

.yk-calculator-block .calculator-navigation button.btn-submit {
  background: var(--calculator-success);
  color: white;
}

.yk-calculator-block
  .calculator-navigation
  button.btn-submit:hover:not(:disabled) {
  background: var(--calculator-primary);
  box-shadow: 0 2px 4px rgba(179, 180, 112, 0.3);
}

.yk-calculator-block .calculator-navigation button.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.yk-calculator-block .calculator-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.yk-calculator-block .calculator-loading .spinner {
  border: 3px solid var(--calculator-gray-50);
  border-top-color: var(--calculator-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

.yk-calculator-block .calculator-success-message {
  background: #ffffff;
  border: 1px solid var(--calculator-success);
  border-radius: 5px;
  padding: 2rem;
  text-align: center;
}

.yk-calculator-block .calculator-success-message h3 {
  color: #000000;
  margin: 0 0 1rem 0;
  font-size: 1.25rem !important;
}

.yk-calculator-block .calculator-success-message p {
  color: #000000;
  margin: 0 0 1.5rem 0;
}

.yk-calculator-block .calculator-success-message button {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 5px;
  font-weight: 600;
  background: var(--calculator-primary);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--wp--preset--font-size--small);
}

.yk-calculator-block .calculator-success-message button:hover {
  background: var(--wp--preset--color--yk-primary);
  box-shadow: 0 2px 4px rgba(93, 81, 121, 0.3);
}

.yk-calculator-block .error-message {
  color: var(--calculator-danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Step 1 Footer Text (below audit type buttons, above form fields) */
.yk-calculator-block .step1-footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--calculator-gray-600);
  margin: 1.5rem 0;
  padding: 1rem 0;
  line-height: 1.5;
}

/* Terms Checkbox */
.yk-calculator-block .terms-checkbox-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--calculator-border);
}

.yk-calculator-block .terms-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.yk-calculator-block .terms-checkbox-label input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  cursor: pointer;
  accent-color: var(--calculator-primary);
  margin-top: 0.125rem;
}

.yk-calculator-block .terms-checkbox-label input[type="checkbox"].error {
  outline: 2px solid var(--calculator-danger);
  outline-offset: 1px;
}

.yk-calculator-block .terms-checkbox-label span a {
  color: var(--calculator-primary);
  text-decoration: underline;
  margin-left: 0.25rem;
}

.yk-calculator-block .terms-checkbox-label span a:hover {
  color: #2563eb;
}

.yk-calculator-block .terms-checkbox-container .error-message {
  margin-top: 0.5rem;
  margin-left: 2rem;
}

.contact-requested-message{
      color: #B3B470 !important;
}

/* Mobile CSS */

@media screen and (max-width: 992px) {
  .yk-calculator-block .audit-type-selection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 0rem;
}

  .yk-calculator-block .calculator-progress {
    margin-top: 0rem;
  }

.yk-calculator-block .step1-footer-text {
      margin: 0.5rem 0; 
}
.yk-calculator-block .user-info-fields .form-field label {
    font-size: var(--wp--preset--font-size--x-small);
    margin-bottom: -10px !important;
}
.yk-calculator-block .calculator-questions .question-field select{
    font-size: var(--wp--preset--font-size--x-small);
}
.yk-calculator-block .user-info-fields .form-field input{
    font-size: var(--wp--preset--font-size--x-small);
}
.yk-calculator-block .calculator-questions .question-field label{
  font-size: var(--wp--preset--font-size--x-small);
    margin-bottom: -5px;
}
.yk-calculator-block .calculator-success-message h3{
  font-size: var(--wp--preset--font-size--small) !important;;
      margin: 0 0 0 0;
}
.yk-calculator-block .calculator-success-message p{
  font-size: var(--wp--preset--font-size--x-small);
}
.calculator-block {
    padding: 0;
}
.yk-calculator-block .user-info-fields .form-field .error-message {
    font-size: var(--wp--preset--font-size--x-small);
}
}

@media (max-width: 768px) {
  .yk-calculator-block .calculator-questions {
    grid-template-columns: 1fr;
  }
}