/* Cotizador Web Plugin — cotizador.css */
.cw-trigger-wrap { display: inline-block; }

.cw-btn-open {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1A56DB; color: #fff; border: none;
  border-radius: 10px; font-size: 15px; font-weight: 500;
  padding: 13px 28px; cursor: pointer; transition: background .15s, transform .1s;
  font-family: inherit;
}
.cw-btn-open:hover  { background: #1244B8; }
.cw-btn-open:active { transform: scale(.98); }
.cw-btn-open svg {
  width: 18px; height: 18px; stroke: currentColor;
  stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* Overlay */
#cw-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,15,15,.55); z-index: 99999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px); animation: cwFadeIn .2s ease;
}
#cw-overlay.cw-open { display: flex; }
@keyframes cwFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal */
.cw-modal {
  background: #fff; width: 100%; max-width: 680px;
  max-height: 96vh; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  animation: cwSlideUp .25s cubic-bezier(.22,.68,0,1.2);
  position: relative;
}
@media (max-width: 700px) {
  .cw-modal { max-height: 100vh; border-radius: 0; height: 100vh; }
  #cw-overlay { padding: 0; }
}
@keyframes cwSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.cw-header {
  padding: 20px 24px 16px; border-bottom: .5px solid rgba(0,0,0,.1);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cw-header h2 { font-size: 17px; font-weight: 600; letter-spacing: -.3px; margin: 0; color: #1A1918; }
.cw-header p  { font-size: 13px; color: #6B6A65; margin: 2px 0 0; }
.cw-btn-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: .5px solid rgba(0,0,0,.1); background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #6B6A65; transition: background .15s; flex-shrink: 0;
}
.cw-btn-close:hover { background: #F7F6F3; color: #1A1918; }
.cw-btn-close svg {
  width: 16px; height: 16px; stroke: currentColor;
  stroke-width: 2; fill: none; stroke-linecap: round;
}

/* Progress */
.cw-progress { padding: 14px 24px 10px; flex-shrink: 0; }
.cw-prog-steps { display: flex; align-items: center; margin-bottom: 10px; }
.cw-prog-step { display: flex; align-items: center; flex: 1; gap: 6px; }
.cw-prog-step:last-child { flex: 0; }
.cw-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #A09F9A;
  background: #fff; transition: all .2s; flex-shrink: 0;
}
.cw-prog-step.cw-done   .cw-step-dot { background: #1A56DB; border-color: #1A56DB; color: #fff; }
.cw-prog-step.cw-active .cw-step-dot { background: #EBF0FD; border-color: #1A56DB; color: #1A56DB; }
.cw-step-line { flex: 1; height: 1.5px; background: rgba(0,0,0,.1); margin: 0 4px; transition: background .3s; }
.cw-prog-step.cw-done .cw-step-line  { background: #1A56DB; }
.cw-step-lbl { display: none; font-size: 11px; color: #A09F9A; white-space: nowrap; }
@media (min-width: 480px) {
  .cw-step-lbl { display: block; }
  .cw-prog-step.cw-active .cw-step-lbl { color: #1A56DB; font-weight: 500; }
  .cw-prog-step.cw-done   .cw-step-lbl { color: #1A1918; }
}
.cw-prog-bar-wrap { height: 3px; background: rgba(0,0,0,.08); border-radius: 2px; overflow: hidden; }
.cw-prog-bar-fill { height: 100%; background: #1A56DB; border-radius: 2px; transition: width .35s cubic-bezier(.4,0,.2,1); }

/* Body & steps */
.cw-body { flex: 1; overflow-y: auto; padding: 24px; }
.cw-step { display: none; animation: cwStepIn .22s ease; }
.cw-step.active { display: block; }
@keyframes cwStepIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cw-step h3 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; margin: 0 0 6px; color: #1A1918; }
.cw-desc    { font-size: 14px; color: #6B6A65; margin: 0 0 20px; line-height: 1.6; }

/* Fields */
.cw-field { margin-bottom: 16px; }
.cw-field label { display: block; font-size: 13px; font-weight: 500; color: #1A1918; margin-bottom: 6px; }
.cw-field select,
.cw-field input[type=text],
.cw-field input[type=email],
.cw-field input[type=tel],
.cw-field textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: #1A1918;
  background: #F7F6F3; border: 1px solid rgba(0,0,0,.18);
  border-radius: 8px; padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s; appearance: none; box-sizing: border-box;
}
.cw-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6A65' 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; padding-right: 36px; cursor: pointer;
}
.cw-field select:focus,
.cw-field input:focus,
.cw-field textarea:focus { border-color: #1A56DB; box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.cw-field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.cw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .cw-field-row { grid-template-columns: 1fr; } }
.cw-field input.cw-error,
.cw-field select.cw-error  { border-color: #E24B4A; box-shadow: 0 0 0 3px rgba(226,75,74,.12); }
.cw-err { font-size: 12px; color: #A32D2D; margin-top: 4px; display: none; }
.cw-field.cw-has-error .cw-err { display: block; }
.cw-ajax-error { font-size: 13px; color: #A32D2D; margin-top: 8px; padding: 10px 12px; background: #FCEBEB; border-radius: 8px; }

/* Chips */
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.cw-chip {
  font-size: 13px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid rgba(0,0,0,.18); cursor: pointer;
  color: #6B6A65; background: #fff; user-select: none;
  transition: all .15s; display: flex; align-items: center; gap: 5px;
}
.cw-chip:hover { border-color: #1A56DB; color: #1A56DB; }
.cw-chip.cw-on { background: #EBF0FD; color: #1A56DB; border-color: #1A56DB; font-weight: 500; }
.cw-chip-check { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; display: none; }
.cw-chip.cw-on .cw-chip-check { display: block; }

/* Result */
.cw-result-card { background: #F7F6F3; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.cw-result-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,0,0,.1); margin-bottom: 14px; }
.cw-result-label { font-size: 12px; color: #6B6A65; margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.cw-result-price { font-size: 36px; font-weight: 700; letter-spacing: -1px; color: #1A1918; line-height: 1; }
.cw-result-price sub { font-size: 14px; font-weight: 400; color: #6B6A65; letter-spacing: 0; }
.cw-result-badge { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 20px; background: #EBF0FD; color: #1A56DB; }
.cw-desglose { width: 100%; border-collapse: collapse; }
.cw-desglose tr { border-top: .5px solid rgba(0,0,0,.08); }
.cw-desglose tr:first-child { border-top: none; }
.cw-desglose td { font-size: 13px; padding: 7px 0; color: #6B6A65; }
.cw-desglose td:last-child { text-align: right; font-weight: 500; color: #1A1918; }
.cw-desglose tr.cw-total td { font-size: 14px; font-weight: 600; color: #1A1918; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.18); }
.cw-disclaimer { font-size: 12px; color: #A09F9A; margin-top: 10px; line-height: 1.5; }

/* Success */
.cw-success { text-align: center; padding: 20px 0 8px; }
.cw-success-icon { width: 56px; height: 56px; border-radius: 50%; background: #E8F5EE; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.cw-success-icon svg { width: 28px; height: 28px; stroke: #0E7A4A; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cw-success h3 { font-size: 20px; margin: 0 0 8px; color: #1A1918; }
.cw-success p  { font-size: 14px; color: #6B6A65; line-height: 1.6; max-width: 360px; margin: 0 auto 20px; }
.cw-summary-pill { display: inline-block; font-size: 13px; font-weight: 500; background: #EBF0FD; color: #1A56DB; border-radius: 20px; padding: 6px 16px; }

/* Footer */
.cw-footer { padding: 16px 24px; border-top: .5px solid rgba(0,0,0,.1); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; background: #fff; }
.cw-btn-back {
  font-size: 14px; font-weight: 500; color: #6B6A65; background: none;
  border: 1px solid rgba(0,0,0,.18); border-radius: 8px; padding: 10px 20px;
  cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 6px; font-family: inherit;
}
.cw-btn-back:hover { color: #1A1918; background: #F7F6F3; }
.cw-btn-next {
  font-size: 14px; font-weight: 500; color: #fff; background: #1A56DB;
  border: none; border-radius: 8px; padding: 10px 24px;
  cursor: pointer; transition: background .15s, transform .1s;
  display: flex; align-items: center; gap: 6px; margin-left: auto; font-family: inherit;
}
.cw-btn-next:hover  { background: #1244B8; }
.cw-btn-next:active { transform: scale(.98); }
.cw-btn-back svg, .cw-btn-next svg {
  width: 16px; height: 16px; stroke: currentColor;
  stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.cw-counter { font-size: 13px; color: #A09F9A; white-space: nowrap; }
