/* ============================================================
   Portenschmiede – Brötchen Bestellformular
   Farben: #4b6e28 (Grün), #9fb500 (Gelbgrün), #00281c (Dunkelgrün)
   ============================================================ */

/* ── Infobox ── */
.bb-hinweis {
    background: #f0f4e8;
    border-left: 4px solid #4b6e28;
    padding: 12px 16px;
    margin-bottom: 28px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* ── Produkt-Grid ── */
.bb-produkte {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.bb-produkt {
    border: 2px solid #dee2d7;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bb-produkt:hover {
    border-color: #9fb500;
    box-shadow: 0 4px 16px rgba(75, 110, 40, 0.12);
}

.bb-produkt-bild img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

/* Platzhalter falls noch kein Bild vorhanden */
.bb-produkt-bild-placeholder {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, #dee2d7 0%, #c8d0be 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.bb-produkt-body {
    padding: 16px;
}

.bb-produkt-body h3 {
    margin: 0 0 4px;
    font-size: 17px;
    color: #00281c;
    font-weight: 700;
}

.bb-preis {
    color: #4b6e28;
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 14px;
}

/* ── Mengenfeld ── */
.bb-menge-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9faf7;
    border-radius: 6px;
    padding: 8px 10px;
}

.bb-menge-wrap label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    margin: 0;
    flex: 1;
}

.bb-menge-input {
    width: 70px !important;
    text-align: center !important;
    border: 1px solid #dee2d7 !important;
    border-radius: 5px !important;
    padding: 7px 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #00281c !important;
    background: #fff !important;
    transition: border-color 0.2s !important;
    -moz-appearance: textfield !important;
}

.bb-menge-input::-webkit-outer-spin-button,
.bb-menge-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bb-menge-input:focus {
    outline: none !important;
    border-color: #4b6e28 !important;
    box-shadow: 0 0 0 3px rgba(75, 110, 40, 0.12) !important;
}

/* Plus/Minus Buttons */
.bb-menge-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #dee2d7;
    border-radius: 4px;
    background: #fff;
    color: #4b6e28;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
}

.bb-menge-btn:hover {
    background: #4b6e28;
    border-color: #4b6e28;
    color: #fff;
}

/* ── Validierungsfehler (CF7) ── */
.bb-menge-input.wpcf7-not-valid {
    border-color: #c0392b !important;
}

span.wpcf7-not-valid-tip {
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
    display: block;
}

/* ── Kundendaten-Block ── */
.bb-kundendaten {
    background: #f9faf7;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 28px;
}

.bb-kundendaten h3 {
    margin: 0 0 20px;
    color: #00281c;
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #dee2d7;
}

.bb-felder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.bb-feld {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bb-feld.bb-feld-full {
    grid-column: 1 / -1;
}

.bb-feld label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.02em;
}

.bb-feld input[type="text"],
.bb-feld input[type="email"],
.bb-feld input[type="tel"],
.bb-feld textarea,
.bb-datepicker {
    width: 100% !important;
    border: 1px solid #dee2d7 !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    color: #222 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s !important;
    font-family: inherit !important;
}

.bb-feld input:focus,
.bb-feld textarea:focus,
.bb-datepicker:focus {
    outline: none !important;
    border-color: #4b6e28 !important;
    box-shadow: 0 0 0 3px rgba(75, 110, 40, 0.12) !important;
}

.bb-datepicker {
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b6e28' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 38px !important;
}

/* ── Submit ── */
.bb-submit {
    text-align: center;
    padding-top: 8px;
}

.bb-submit input[type="submit"],
.bb-submit .wpcf7-submit {
    background: #4b6e28 !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 48px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.1s !important;
    letter-spacing: 0.03em !important;
}

.bb-submit input[type="submit"]:hover {
    background: #3a5620 !important;
    transform: translateY(-1px) !important;
}

.bb-submit input[type="submit"]:active {
    transform: translateY(0) !important;
}

/* ── CF7 Meldungen ── */
.wpcf7-response-output {
    border-radius: 6px !important;
    margin-top: 16px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
}

/* ── Flatpickr Anpassungen ── */
.flatpickr-calendar {
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    font-family: inherit !important;
}

.flatpickr-months .flatpickr-month {
    background: #4b6e28 !important;
    color: #fff !important;
    border-radius: 10px 10px 0 0 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #9fb500 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #fff !important;
}

.flatpickr-weekday {
    color: #4b6e28 !important;
    font-weight: 700 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #4b6e28 !important;
    border-color: #4b6e28 !important;
    color: #fff !important;
}

.flatpickr-day:hover:not(.disabled):not(.selected) {
    background: #f0f4e8 !important;
    border-color: #9fb500 !important;
}

.flatpickr-day.today:not(.selected) {
    border-color: #9fb500 !important;
}

.flatpickr-day.disabled {
    color: #ccc !important;
    cursor: not-allowed !important;
}

/* Aktive / buchbare Tage: grün */
.flatpickr-day.bb-tag-aktiv {
    background: #eaf4e0 !important;
    border-color: #9fb500 !important;
    color: #00281c !important;
    font-weight: 600 !important;
}

.flatpickr-day.bb-tag-aktiv:hover {
    background: #4b6e28 !important;
    border-color: #4b6e28 !important;
    color: #fff !important;
}

/* Bereits ausgewählter Tag bleibt dunkelgrün */
.flatpickr-day.bb-tag-aktiv.selected,
.flatpickr-day.bb-tag-aktiv.selected:hover {
    background: #4b6e28 !important;
    border-color: #4b6e28 !important;
    color: #fff !important;
}

/* Gesperrte Tage: deutlich rot */
.flatpickr-day.bb-tag-gesperrt {
    background: #fde8e8 !important;
    border-color: #f5c6cb !important;
    color: #c0392b !important;
    cursor: not-allowed !important;
    text-decoration: line-through !important;
    font-weight: 600 !important;
    opacity: 0.85 !important;
}

.flatpickr-day.bb-tag-gesperrt:hover {
    background: #fad0d0 !important;
    color: #c0392b !important;
}

/* ── Gesamtpreis ── */
.bb-gesamtpreis-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #f0f4e8;
    border: 2px solid #4b6e28;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 28px;
    font-size: 17px;
}

.bb-gp-label {
    color: #555;
    font-weight: 600;
}

.bb-gp-wert {
    font-size: 22px;
    font-weight: 700;
    color: #aaa;
    transition: color 0.2s;
    min-width: 90px;
    text-align: right;
}

/* ── Responsive ── */
@media (max-width: 680px) {
    /* Produkte: immer 2 Spalten nebeneinander */
    .bb-produkte {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* Bild etwas flacher damit die Karte nicht zu hoch wird */
    .bb-produkt-bild img,
    .bb-produkt-bild-placeholder {
        height: 130px;
    }

    /* Body etwas kompakter */
    .bb-produkt-body {
        padding: 10px 10px 12px;
    }

    .bb-produkt-body h3 {
        font-size: 18px !important;
        line-height: 1.3 !important;
        word-break: break-word;
    }

    .bb-preis {
        font-size: 13px;
        margin-bottom: 10px;
    }

    /* Mengenwähler: Label ausblenden, kompakter */
    .bb-menge-wrap {
        padding: 6px 8px;
        gap: 6px;
    }

    .bb-menge-wrap label {
        display: none;
    }

    .bb-menge-input {
        width: 50px !important;
        font-size: 15px !important;
    }

    .bb-menge-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    /* Gesamtpreis */
    .bb-gesamtpreis-box {
        padding: 10px 14px;
        font-size: 15px;
    }

    .bb-gp-wert {
        font-size: 18px;
    }

    /* Kontaktfelder */
    .bb-felder-grid {
        grid-template-columns: 1fr;
    }

    .bb-feld.bb-feld-full {
        grid-column: 1;
    }

    .bb-kundendaten {
        padding: 16px;
    }
}
