/* ============================================================
   Content Press Kalkulačky v2.0 — cp-kalk prefix
   ============================================================ */

.cp-kalk-wrap *, .cp-kalk-wrap *::before, .cp-kalk-wrap *::after {
  box-sizing: border-box;
}
.cp-kalk-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  max-width: 980px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---- Header ---- */
.cp-kalk-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}
.cp-kalk-header-icon {
  flex-shrink: 0;
  background: #dc2626;
  color: #fff;
  border-radius: 10px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.cp-kalk-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.2;
}
.cp-kalk-subtitle { color: #6b7280; margin: 0; font-size: .9rem; }

/* ---- Layout ---- */
.cp-kalk-body { display: flex; flex-direction: column; gap: 20px; }

/* ---- Cards ---- */
.cp-kalk-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.cp-kalk-section-label {
  display: flex; align-items: center; gap: 6px;
  color: #dc2626;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}

/* ---- Option button grid ---- */
.cp-kalk-btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.cp-kalk-opt-btn {
  text-align: left;
  background: #fff;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  width: 100%;
  font-family: inherit;
}
.cp-kalk-opt-btn:hover { border-color: #e5e7eb; }
.cp-kalk-opt-btn.is-active { border-color: #dc2626; background: #fef2f2; }
.cp-kalk-opt-btn-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 4px;
}
.cp-kalk-opt-name { font-weight: 700; font-size: .85rem; }
.cp-kalk-opt-check { display: none; color: #dc2626; flex-shrink: 0; }
.is-active .cp-kalk-opt-check { display: block; }
.cp-kalk-opt-desc { font-size: .75rem; color: #6b7280; line-height: 1.4; margin-bottom: 6px; }
.cp-kalk-opt-meta { font-size: .75rem; font-weight: 700; color: #1a1a1a; }
.cp-kalk-opt-meta span { color: #9ca3af; font-weight: 400; }

/* ---- Toggle buttons (small, e.g. thickness) ---- */
.cp-kalk-toggle-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-kalk-toggle-btn {
  padding: 8px 18px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: .85rem; font-weight: 700;
  color: #6b7280; cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.cp-kalk-toggle-btn.is-active { border-color: #dc2626; color: #dc2626; background: #fef2f2; }

/* ---- Fields ---- */
.cp-kalk-dims-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.cp-kalk-field label {
  display: block;
  font-size: .8rem; font-weight: 500;
  color: #374151; margin-bottom: 6px;
}
.cp-kalk-required { color: #dc2626; }
.cp-kalk-field input[type="number"],
.cp-kalk-field input[type="text"],
.cp-kalk-field input[type="email"],
.cp-kalk-field input[type="tel"],
.cp-kalk-field select,
.cp-kalk-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  appearance: none;
}
.cp-kalk-field input:focus,
.cp-kalk-field select:focus,
.cp-kalk-field textarea:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}
.cp-kalk-field textarea { height: 88px; resize: vertical; }
.cp-kalk-field-note { font-size: .7rem; color: #9ca3af; margin-top: 4px; }

/* ---- Checkboxes ---- */
.cp-kalk-checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border: 1px solid #f0f0f0; border-radius: 10px;
  cursor: pointer; margin-bottom: 8px;
  transition: background .12s;
}
.cp-kalk-checkbox-row:last-child { margin-bottom: 0; }
.cp-kalk-checkbox-row:hover { background: #f9fafb; }
.cp-kalk-checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  accent-color: #dc2626; cursor: pointer;
}
.cp-kalk-chk-name { display: block; font-size: .85rem; font-weight: 500; }
.cp-kalk-chk-desc { display: block; font-size: .75rem; color: #6b7280; }

/* ---- Graphics section ---- */
.cp-kalk-graphics-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.cp-kalk-graphics-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 2px solid #e5e7eb; border-radius: 12px;
  background: #fff; cursor: pointer;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.cp-kalk-graphics-btn.is-active { border-color: #dc2626; background: #fef2f2; }
.cp-kalk-radio-circle {
  width: 18px; height: 18px;
  border: 2px solid #d1d5db; border-radius: 50%;
  flex-shrink: 0;
}
.is-active .cp-kalk-radio-circle {
  border-color: #dc2626; background: #dc2626;
  box-shadow: inset 0 0 0 3px #fff;
}

.cp-kalk-upload-area {
  border: 2px dashed #e5e7eb; border-radius: 14px;
  padding: 28px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.cp-kalk-upload-area:hover { border-color: #fca5a5; background: #fef2f2; }
.cp-kalk-upload-icon {
  width: 44px; height: 44px;
  background: #f3f4f6; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; color: #9ca3af;
  transition: background .15s, color .15s;
}
.cp-kalk-upload-area:hover .cp-kalk-upload-icon { background: #fee2e2; color: #dc2626; }
.cp-kalk-upload-text { font-size: .85rem; font-weight: 500; color: #374151; }
.cp-kalk-upload-hint { font-size: .72rem; color: #9ca3af; margin-top: 4px; }

.cp-kalk-info-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  font-size: .8rem; line-height: 1.5;
}
.cp-kalk-info-box.is-blue { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.cp-kalk-info-box.is-amber { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.cp-kalk-info-box svg { flex-shrink: 0; margin-top: 2px; }

/* ---- Summary bar ---- */
.cp-kalk-summary {
  background: #dc2626; color: #fff;
  border-radius: 20px; padding: 24px 28px;
  position: relative; overflow: hidden;
}
.cp-kalk-summary::after {
  content: ''; position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.08);
  border-radius: 50%; filter: blur(20px);
  pointer-events: none;
}
.cp-kalk-summary-inner {
  display: flex; flex-direction: column; gap: 20px;
}
@media (min-width: 680px) {
  .cp-kalk-summary-inner { flex-direction: row; align-items: center; }
}
.cp-kalk-summary-stats { flex: 1; }
.cp-kalk-summary-label {
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: #fca5a5; margin: 0 0 14px;
}
.cp-kalk-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cp-kalk-stat-label { font-size: .72rem; color: #fca5a5; display: block; margin-bottom: 2px; }
.cp-kalk-stat-val { font-size: 1.05rem; font-weight: 700; }
.cp-kalk-stat-val.is-big { font-size: 1.8rem; line-height: 1; }
.cp-kalk-summary-action { flex-shrink: 0; }
@media (min-width: 680px) { .cp-kalk-summary-action { min-width: 220px; } }

/* ---- Buttons ---- */
.cp-kalk-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: #fff; color: #dc2626;
  font-weight: 700; font-size: .9rem;
  border: none; border-radius: 12px;
  padding: 14px; cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.cp-kalk-btn:hover { background: #fef2f2; }
.cp-kalk-btn:active { transform: scale(.98); }
.cp-kalk-btn.is-red { background: #dc2626; color: #fff; }
.cp-kalk-btn.is-red:hover { background: #b91c1c; }
.cp-kalk-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---- Info card below summary ---- */
.cp-kalk-info-card {
  background: #fff; border: 1px solid #f0f0f0;
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.cp-kalk-info-card svg { color: #dc2626; flex-shrink: 0; margin-top: 2px; }
.cp-kalk-info-card p { font-size: .75rem; color: #6b7280; margin: 0; line-height: 1.5; }

/* ---- Modal ---- */
.cp-kalk-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.cp-kalk-overlay.is-open { opacity: 1; pointer-events: all; }
.cp-kalk-modal {
  background: #fff; border-radius: 20px;
  width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
  transform: scale(.95) translateY(16px);
  transition: transform .2s;
}
.cp-kalk-overlay.is-open .cp-kalk-modal { transform: scale(1) translateY(0); }
.cp-kalk-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #f0f0f0;
}
.cp-kalk-modal-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.cp-kalk-modal-close {
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 50%;
  display: flex; align-items: center; color: #6b7280;
  transition: background .12s;
}
.cp-kalk-modal-close:hover { background: #f3f4f6; }
.cp-kalk-modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }

/* ---- Status messages ---- */
.cp-kalk-status {
  padding: 12px 16px; border-radius: 10px;
  font-size: .85rem; line-height: 1.5; display: none;
}
.cp-kalk-status.is-ok  { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; display: block; }
.cp-kalk-status.is-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; display: block; }

/* ---- Spinner ---- */
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-kalk-spinner { animation: cp-spin .8s linear infinite; display: block; }

/* ---- Textile preview (SVG shirt) ---- */
.cp-kalk-preview-wrap { margin-top: 20px; text-align: center; }
.cp-kalk-shirt-svg { max-width: 260px; width: 100%; }
.cp-kalk-print-zone { transition: opacity .3s; }
