/* =========================================================
   Car Shipping Calculator — Shortcode styles
   Works on any WordPress page, post, or LiveCanvas section.
   Scoped to .csc-sc-* so it won't conflict with your theme.
   ========================================================= */

.csc-sc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 640px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

/* Card style (default) */
.csc-sc-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 24px;
}

/* Flat style — no wrapper, inherits page bg */
.csc-sc-flat {
  padding: 0;
}

/* Heading */
.csc-sc-heading {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

/* Result banner */
.csc-result-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: none;
}
.csc-result-banner.csc-show { display: block; }
.csc-result-price { font-size: 22px; font-weight: 600; color: #1a5fd4; }
.csc-result-note  { font-size: 11px; color: #6b7280; margin-top: 2px; }

/* Grid */
.csc-sc-wrap .csc-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

/* Fields */
.csc-sc-wrap .csc-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}
.csc-sc-wrap .csc-field input,
.csc-sc-wrap .csc-field select {
  width: 100%;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
.csc-sc-wrap .csc-field input:focus,
.csc-sc-wrap .csc-field select:focus {
  outline: none;
  border-color: #1a5fd4;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26,95,212,0.1);
}
.csc-sc-wrap .csc-field input.csc-err { border-color: #ef4444; }

/* Transport toggle */
.csc-sc-wrap .csc-transport-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.csc-sc-wrap .csc-transport-opt {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f9fafb;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.csc-sc-wrap .csc-transport-opt strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #111827;
}
.csc-sc-wrap .csc-transport-opt span {
  font-size: 10px;
  color: #9ca3af;
}
.csc-sc-wrap .csc-transport-opt.csc-active {
  border: 2px solid #1a5fd4;
  background: #eff6ff;
}

/* Button */
.csc-sc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: #1a5fd4;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.csc-sc-btn:hover { background: #1d4ed8; }

.csc-sc-note {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 8px;
}

/* Modal */
.csc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(17,24,39,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.csc-modal {
  background: #ffffff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  position: relative;
}
.csc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  line-height: 30px;
  text-align: center;
}
.csc-modal-badge {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.csc-modal h2 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}
.csc-modal p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 14px;
}
.csc-est-line {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
  color: #6b7280;
}
.csc-est-line strong { font-size: 17px; font-weight: 600; color: #1a5fd4; }
.csc-modal-field { margin-bottom: 10px; }
.csc-modal-field label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 4px;
}
.csc-modal-field input {
  width: 100%;
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #111827;
  font-family: inherit;
  -webkit-appearance: none;
}
.csc-modal-field input:focus {
  outline: none;
  border-color: #1a5fd4;
  box-shadow: 0 0 0 3px rgba(26,95,212,0.1);
}
.csc-modal-field input.csc-err { border-color: #ef4444; }
.csc-modal .csc-btn,
.csc-modal #csc-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: #1a5fd4;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-top: 6px;
}
.csc-modal .csc-btn:hover,
.csc-modal #csc-submit:hover { background: #1d4ed8; }
.csc-modal-terms {
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  margin-top: 8px !important;
  line-height: 1.5;
}

/* Success overlay */
.csc-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(17,24,39,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.csc-success-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 40px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}
.csc-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #d1fae5;
  color: #065f46;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.csc-success-box h2 {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}
.csc-success-box p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.65;
  margin-bottom: 20px;
}
.csc-success-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.csc-success-stats > div {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 6px;
}
.csc-success-stats strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.csc-success-stats span {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
  display: block;
}
.csc-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 42px;
  background: #f3f4f6;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}

/* Mobile */
@media (max-width: 580px) {
  .csc-sc-wrap .csc-calc-grid    { grid-template-columns: 1fr; }
  .csc-sc-wrap .csc-transport-row{ grid-template-columns: 1fr; }
  .csc-modal-overlay { align-items: flex-end; padding: 0; }
  .csc-modal {
    border-radius: 16px 16px 0 0;
    padding: 20px 16px 32px;
    max-width: 100%;
  }
  .csc-modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin: 0 auto 16px;
  }
}
