/* assets/css/custom-modern.css */

/* 
 * Mapping der Gutenberg-Farbpalette (aus der theme.json) 
 * auf die bestehenden Bootstrap-Variablen des Themes.
 * Dies überschreibt die statischen Werte aus der alten style.css.
 */
:root {
  --primary: var(--wp--preset--color--primary, #ff0800);
  --blue: var(--wp--preset--color--blue, #1f2332);
  --secondary: var(--wp--preset--color--secondary, #707070);
  --light: var(--wp--preset--color--light, #f8f9fa);

  /* Falls du später weitere Farben in der theme.json ergänzt, 
     kannst du sie hier einfach weiter mappen */
}

/* ==========================================================================
   Modern Contact Form 7 Styling
   ========================================================================== */

/* Wrapper */
.wpcf7 {
  --form-bg: #ffffff;
  --form-border: #e2e8f0;
  --form-border-focus: var(--primary);
  --form-text: #334155;
  --form-shadow-focus: rgba(255, 8, 0, 0.15);
  --form-radius: 8px;

  background-color: transparent;
  width: 100%;
  margin: 0 auto;
}

/* Typography & Layout */
.wpcf7 label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
  display: block;
}

.wpcf7 h6,
.wpcf7 .pt-4.pb-3 {
  color: var(--blue);
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--form-border);
  padding-bottom: 0.75rem !important;
  margin-bottom: 1.5rem !important;
}

/* Input Fields */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: var(--form-radius);
  font-size: 1rem;
  color: var(--form-text);
  line-height: 1.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wpcf7 textarea {
  min-height: 140px;
  resize: vertical;
}

/* Focus States (Micro-animations / Glassmorphism tint) */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--form-border-focus);
  box-shadow: 0 0 0 4px var(--form-shadow-focus), 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  background-color: #fff;
}

/* Select custom appearance */
.wpcf7 select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' 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 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  /* Fix für Select Cut-off / Dots: explizite Höhe anstelle von vertikalem Padding */
  height: 53px;
  /* Entspricht der Höhe der Text-Inputs (1.5em line-height + 2 * 0.85rem padding + 2px border) */
  padding-top: 0;
  padding-bottom: 0;
}

/* Privacy Checkbox area */
.wpcf7 .privacy-checkbox {
  background: var(--light);
  padding: 1.25rem;
  border-radius: var(--form-radius);
  border: 1px dashed var(--form-border);
  margin-top: 2rem !important;
}

.wpcf7 .privacy-checkbox label,
.wpcf7 .wpcf7-list-item-label {
  display: inline;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--secondary);
  line-height: 1.6;
  margin-left: 0.5rem;
}

/* Custom Checkbox */
.wpcf7 input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
  cursor: pointer;
  position: relative;
  top: 3px;
}

/* Submit Button */
.wpcf7 input[type="submit"] {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--form-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(255, 8, 0, 0.2);
  width: auto;
  min-width: 200px;
  letter-spacing: 0.5px;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus {
  background-color: #e60700;
  box-shadow: 0 6px 12px rgba(255, 8, 0, 0.3);
  transform: translateY(-2px);
}

.wpcf7 input[type="submit"]:active {
  transform: translateY(0);
}

/* Validation Errors */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
  color: #991b1b;
  border-radius: var(--form-radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-weight: 500;
}

.wpcf7 form.sent .wpcf7-response-output {
  border-left: 4px solid #10b981;
  background: #ecfdf5;
  color: #065f46;
  border-radius: var(--form-radius);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-weight: 500;
}

.wpcf7-not-valid-tip {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.4rem;
  display: block;
}

/* Fix AJAX Loader positioning */
.wpcf7-spinner {
  background-color: var(--primary);
  margin: 0 10px;
}

/* Placeholder transitions */
.wpcf7 ::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* ==========================================================================
   Fix Event List Overlapping (Absolut Position Bug)
   ========================================================================== */

/* Overwrite the absolute positioning that causes text boxes (like on meet-us
   page for the events) to overlap each other vertically when the image is small.
   We use CSS Grid natively here. */
@media (min-width: 992px) {

  .image-box.left,
  .image-box.right {
    display: grid !important;
    align-items: center;
    grid-template-columns: repeat(12, 1fr);
  }

  .image-box picture,
  .image-box>a {
    display: contents !important;
  }

  .image-box.left img,
  .image-box.right img {
    max-width: 100% !important;
    width: 85% !important;
    /* Reduced from 100% to leave space so wide logos don't stick to the overlapping text box */
    height: 350px !important;
    /* Uniform height limit to match Elephant */
    object-fit: contain !important;
    position: relative;
    z-index: 1;
    margin: 0 !important;
    background: transparent !important;
  }

  .image-box.left .body,
  .image-box.right .body {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
    z-index: 2;
    right: auto !important;
    left: auto !important;
    float: none !important;
  }

  /* Left Align: Image left (col 1-7), Box right (col 6-12) */
  .image-box.left img {
    grid-column: 1 / 8 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    object-position: left center !important;
  }

  .image-box.left .body {
    grid-column: 6 / 13 !important;
    grid-row: 1 !important;
  }

  /* Right Align: Box left (col 1-7), Image right (col 6-12) */
  .image-box.right img {
    grid-column: 6 / 13 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    object-position: right center !important;
  }

  .image-box.right .body {
    grid-column: 1 / 8 !important;
    grid-row: 1 !important;
  }

  /* Grid fallbacks for empty image */
  .image-box.left.no-image .body,
  .image-box.right.no-image .body {
    grid-column: 1 / 13 !important;
  }
}

/* Fix vertical overflow on missing images layout */
.image-box.top.no-image .body,
.image-box.bottom.no-image .body {
  margin-top: 0 !important;
}

/* ==========================================================================
   Software Archive / Cards
   ========================================================================== */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/**
 * credativ/pill – Shared Styles
 * Gilt für Frontend (style) und Editor (editorStyle).
 *
 * Datei: /wp-content/themes/DEIN-CHILD-THEME/credativ-pill-block/build/pill.css
 */

.credativ-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Farbvarianten */
.credativ-pill--green {
  background-color: #e1f5ee;
  color: #085041;
}

.credativ-pill--amber {
  background-color: #faeeda;
  color: #633806;
}

.credativ-pill--red {
  background-color: #fcebeb;
  color: #791f1f;
}

.credativ-pill--blue {
  background-color: #e6f1fb;
  color: #0c447c;
}

/* Inline-Kontext (z.B. in Tabellenzelle) */
td .credativ-pill,
th .credativ-pill {
  display: inline-block;
}