/* ==========================================================
   kalender2.css — Modernes Design fuer Terminbuchung
   ========================================================== */

.k2 {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* --- Dev Banner --- */
.k2-dev-banner {
  background: #e00;
  color: #fff;
  text-align: center;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* --- Header / Logo --- */
.k2-header {
  text-align: center;
  padding: 24px 0 8px;
}
.k2-logo {
  width: 60%;
  min-width: 200px;
  max-width: 280px;
}
.k2-subtitle {
  color: #FFF;
  font-size: 14px;
  margin-top: 4px;
}

/* --- Stepper --- */
.k2-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 24px;
  gap: 0;
}
.k2-step {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
}
.k2-step-active {
  opacity: 1;
}
.k2-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0a30ad;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.k2-step-done .k2-step-circle {
  background: #1a8f3a;
}
.k2-step-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.k2-step-line {
  width: 32px;
  height: 3px;
  background: #ccc;
  margin: 0 6px;
  border-radius: 2px;
  flex-shrink: 0;
}
.k2-step-line-active {
  background: #1a8f3a;
}

/* --- Card --- */
.k2-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 16px;
}

/* --- Titel / Beschreibung --- */
.k2-title {
  font-size: 24px;
  font-weight: 700;
  color: #0a30ad;
  margin: 0 0 8px;
  line-height: 1.2;
}
.k2-title-success {
  color: #1a8f3a;
}
.k2-desc {
  color: #555;
  font-size: 15px;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* --- Form Inputs --- */
.k2-form-group {
  margin-bottom: 14px;
}
.k2-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 1.5px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.k2-input:focus {
  border-color: #0a30ad;
  box-shadow: 0 0 0 3px rgba(10, 48, 173, 0.1);
}
.k2-input::placeholder {
  color: #999;
}
.k2-input-sm {
  padding: 10px 12px;
  font-size: 14px;
}
.k2-select {
  cursor: pointer;
  color: #333;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.k2-select option[value=""] {
  color: #999;
}
.k2-textarea {
  min-height: 100px;
  resize: vertical;
}
.k2-form-row {
  display: flex;
  gap: 12px;
}
.k2-form-col-plz {
  flex: 0 0 100px;
}
.k2-form-col-ort {
  flex: 1;
}
.k2-form-col-half {
  flex: 1;
}
.k2-checkbox-row {
  font-size: 14px;
  color: #555;
}
.k2-checkbox-row label {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.k2-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0a30ad;
}

/* --- Buttons --- */
.k2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.k2-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.k2-btn-block {
  display: flex;
  width: 100%;
}
.k2-btn-primary {
  background: #1a8f3a;
  color: #fff;
}
.k2-btn-primary:hover:not(:disabled) {
  background: #157a31;
}
.k2-btn-cancel {
  background: transparent;
  color: #888;
  border: none;
  margin-top: 8px;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
}
.k2-btn-cancel:hover {
  color: #555;
  text-decoration: underline;
}
.k2-btn-secondary {
  background: #f0f0f0;
  color: #333;
}
.k2-btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
}

/* --- Trust Badges --- */
.k2-trust {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.k2-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  padding: 6px 0;
}
.k2-trust-icon {
  color: #1a8f3a;
  font-size: 8px;
}

/* --- Google Bewertung --- */
.k2-google-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 16px;
  /* background: #f8f9fa; */
  background: #0a30ad;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}
.k2-google-logo {
  font-family: 'Google Sans', 'Product Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #FFF;
  letter-spacing: -0.2px;
}
.k2-google-logo-img {
  height: 20px;
  width: auto;
}
.k2-google-stars {
  font-size: 16px;
  color: #fbbc04;
  letter-spacing: 1px;
}
.k2-google-text {
  font-size: 13px;
  color: #FFF;
  font-weight: 500;
}

/* --- Intern Hint --- */
.k2-intern-hint {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #856404;
  margin-bottom: 16px;
}

/* --- Filter --- */
.k2-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.k2-filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.k2-filter-row .k2-input {
  max-width: 180px;
}

/* --- Loading --- */
.k2-loading {
  text-align: center;
  padding: 40px 0;
  color: #666;
  font-size: 15px;
}
.k2-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #ddd;
  border-top: 3px solid #0a30ad;
  border-radius: 50%;
  animation: k2spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes k2spin {
  to { transform: rotate(360deg); }
}

/* --- Calendar Table --- */
.k2-calendar-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -24px;
  padding: 0 24px;
}
.k2-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 440px;
}
.k2-table th,
.k2-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0;
}

/* Kopfzeile */
.k2-th-zeit {
  width: 0;
  padding: 0;
}
.k2-th-tag {
  padding: 8px 4px 12px;
}
.k2-th-heute {
  background: #f0f4ff;
  border-radius: 8px 8px 0 0;
}
.k2-tag-wochentag {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-transform: capitalize;
}
.k2-tag-datum {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* Zellen */
.k2-td-zeit {
  font-size: 12px;
  color: #999;
  text-align: right;
  padding-right: 8px;
  white-space: nowrap;
  width: 0;
  /* BUGFIX: display:none entfernt! Wenn die Body-Zeitspalte hidden ist
     aber die Header-Zeitspalte sichtbar, verschieben sich alle Body-Spalten
     um eins nach links → Dienstag-Daten unter Montag-Header */
  visibility: hidden;
  padding: 0;
  overflow: hidden;
  max-width: 0;
}
.k2-td-slot {
  padding: 4px 3px;
  height: 38px;
}
.k2-slot-time {
  display: inline-block;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 600;
  color: #1a8f3a;
  background: #e8f5eb;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
  transition: all 0.12s;
  box-sizing: border-box;
}
.k2-slot-time:hover {
  background: #1a8f3a;
  color: #fff;
}
.k2-slot-dash {
  font-size: 13px;
  color: #ccc;
  letter-spacing: 2px;
}

/* Heute-Spalte */
.k2-th-heute ~ .k2-td-slot {
  background: #f0f4ff;
}

/* No Slots */
.k2-no-slots {
  text-align: center;
  padding: 32px 0;
  color: #888;
  font-size: 15px;
  font-weight: 500;
}

/* Weitere Termine */
.k2-more-row {
  text-align: center;
  padding: 16px 0 4px;
}
.k2-more-link {
  color: #1a8f3a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.k2-more-link:hover {
  text-decoration: underline;
}

/* --- KW-Navigation --- */
.k2-kw-nav {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 0 4px;
  margin-bottom:10px;
}
.k2-kw-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1a8f3a;
  background: #fff;
  border: 2px solid #1a8f3a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.k2-kw-btn:hover {
  background: #1a8f3a;
  color: #fff;
}

/* --- Tarif --- */
.k2-tarif {
  font-size: 14px;
  color: #555;
  padding: 8px 0;
  margin-bottom: 8px;
}

/* --- Success Page --- */
.k2-card-success {
  text-align: center;
}
.k2-success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a8f3a;
  color: #fff;
  font-size: 24px;
  margin-bottom: 8px;
}
.k2-success-label {
  font-size: 14px;
  color: #1a8f3a;
  font-weight: 600;
  margin-bottom: 16px;
}
.k2-success-info {
  text-align: left;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}
.k2-success-info p {
  margin: 0;
}
.k2-subtitle {
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
  margin: 20px 0 8px;
}
.k2-contact-box {
  margin-top: 24px;
  padding: 20px;
  background: #0a30ad;
  color: #fff;
  border-radius: 8px;
  font-size: 15px;
}
.k2-phone-link {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}
.k2-phone-link:hover {
  text-decoration: underline;
}

/* --- Debug --- */
.k2-debug-icon {
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 11px;
  color: #0a30ad;
  cursor: pointer;
  opacity: 0.6;
  line-height: 1;
  z-index: 2;
}
.k2-debug-icon:hover {
  opacity: 1;
}
.k2-td-slot {
  position: relative;
}
.k2-td-debug-active {
  outline: 2px solid #0a30ad;
  border-radius: 4px;
}
.k2-debug-panel {
  background: #f8f9fa;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 13px;
  overflow: hidden;
}
.k2-debug-header {
  background: #0a30ad;
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.k2-debug-close {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.8;
}
.k2-debug-close:hover {
  opacity: 1;
}
.k2-debug-body {
  padding: 12px;
}
.k2-debug-row {
  display: flex;
  gap: 16px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.k2-debug-col {
  flex: 1;
  min-width: 180px;
}
.k2-debug-label {
  font-weight: 600;
  color: #333;
}
.k2-debug-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: 12px;
}
.k2-debug-table th,
.k2-debug-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
}
.k2-debug-table th {
  font-weight: 600;
  color: #555;
  background: #eee;
}
.k2-debug-addr {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Slot belegt (Step 5) --- */

/* --- Footer --- */
.k2-footer {
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
  color: #888;
}
.k2-footer a {
  color: #888;
  text-decoration: none;
}
.k2-footer a:hover {
  color: #333;
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 500px) {
  .k2 {
    padding: 0 12px 32px;
  }
  .k2-card {
    padding: 22px 18px;
    border-radius: 10px;
  }
  .k2-title {
    font-size: 21px;
  }
  .k2-stepper {
    padding: 16px 0 20px;
  }
  .k2-step-label {
    font-size: 11px;
  }
  .k2-step-line {
    width: 20px;
  }
  .k2-step-circle {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }
  .k2-table {
    min-width: 320px;
  }
  .k2-slot-time {
    font-size: 12px;
    padding: 5px 1px;
  }
}

/* Print */
@media print {
  .k2-stepper,
  .k2-footer,
  .k2-trust,
  .k2-dev-banner {
    display: none !important;
  }
}
