/* =========================================
   CCF All-in-One – Frontend Styles
   Ziel: Optik wie Screenshot 2
   ========================================= */

/* Grundlayout des Formulars */
.ccf-form {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 15px;
  box-sizing: border-box;
}

.ccf-form-inner {
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #dedede;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  padding: 24px 26px 30px;
}

/* Grid: einspaltig / zweispaltig / dreispaltig wie im Builder */
.ccf-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 16px;
}

/* Basis-Spalte */
.ccf-col {
  box-sizing: border-box;
  margin-bottom: 4px;
}

/* Layout-Breiten (kommen aus PHP: full-width / half-width / third-width) */
.ccf-col.full-width {
  flex: 0 0 100%;
}

.ccf-col.half-width {
  flex: 0 0 calc(50% - 8px);
}

.ccf-col.third-width {
  flex: 0 0 calc(33.333% - 10px);
}

/* Mobile: alles untereinander */
@media (max-width: 768px) {
  .ccf-col.half-width,
  .ccf-col.third-width {
    flex: 0 0 100%;
  }
}

/* Labels */
.ccf-col > label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: #222;
}

/* Inputs, Selects, Textareas – einheitlicher Look */
.ccf-form-inner input[type="text"],
.ccf-form-inner input[type="email"],
.ccf-form-inner input[type="number"],
.ccf-form-inner input[type="tel"],
.ccf-form-inner select,
.ccf-form-inner textarea {
  width: 100%;
  display: block;
  border: 1px solid #dcdcdc;
  border-radius: 3px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.4;
  background-color: #ffffff;
  color: #222;
  box-sizing: border-box;
}

.ccf-form-inner textarea {
  min-height: 80px;
  resize: vertical;
}

/* Focus-Zustand – dezente grüne Hervorhebung */
.ccf-form-inner input[type="text"]:focus,
.ccf-form-inner input[type="email"]:focus,
.ccf-form-inner input[type="number"]:focus,
.ccf-form-inner input[type="tel"]:focus,
.ccf-form-inner select:focus,
.ccf-form-inner textarea:focus {
  outline: none;
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40,167,69,0.18);
}

/* Select-Pfeil – kompakter */
.ccf-form-inner select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #444 50%),
                    linear-gradient(135deg, #444 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

/* iOS Select Fix */
.ccf-form-inner select::-ms-expand {
  display: none;
}

/* Telefonnummer: kleines Vorwahl-Dropdown + großes Nummernfeld */
.ccf-phone {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.ccf-phone select {
  flex: 0 0 80px;          /* kleines Feld wie im Screenshot */
  max-width: 80px;
  padding-left: 10px;
  padding-right: 8px;
}

.ccf-phone .tel-number,
.ccf-phone input[type="number"] {
  flex: 1 1 auto;
}

/* Checkbox-Gruppe (Fensterart etc.) */
.ccf-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.ccf-multi-item {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.ccf-multi-item input[type="checkbox"] {
  margin-right: 6px;
}

/* Einzelne Checkbox */
.ccf-form-inner input[type="checkbox"] {
  width: auto;
  display: inline-block;
}

/* Submit-Button */
.ccf-submit {
  margin-top: 20px;
  background-color: #28a745;
  border: 1px solid #1f7e34;
  color: #ffffff;
  padding: 10px 26px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}

.ccf-submit:hover {
  background-color: #23913d;
}

/* Erfolgsmeldung via ?success=1 kannst du bei Bedarf hier noch stylen */
.ccf-form .ccf-success {
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 3px;
  color: #155724;
  font-size: 14px;
}
