/* KontaktPlugin – Frontend Styles */
/* Minimales, leicht überschreibbares Design */

/* === Form Wrapper === */
.kp-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
}

/* === Progress Bar === */
.kp-form__progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    padding: 0;
    list-style: none;
}

.kp-form__progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    position: relative;
    text-align: center;
}

.kp-form__progress-step::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background: #ddd;
}

.kp-form__progress-step:last-child::after {
    display: none;
}

.kp-form__progress-step--completed::after {
    background: #4caf50;
}

.kp-form__progress-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.kp-form__progress-step--active .kp-form__progress-number {
    background: #0073aa;
    color: #fff;
}

.kp-form__progress-step--completed .kp-form__progress-number {
    background: #4caf50;
    color: #fff;
}

.kp-form__progress-label {
    font-size: 12px;
    color: #888;
}

.kp-form__progress-step--active .kp-form__progress-label {
    color: #0073aa;
    font-weight: 600;
}

/* === Steps === */
.kp-form__step {
    display: none;
}

.kp-form__step--active {
    display: block;
}

/* === Fields === */
.kp-form__field {
    margin-bottom: 20px;
}

.kp-form__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.kp-form__required {
    color: #dc3232;
    margin-left: 2px;
}

.kp-form__input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.kp-form__input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
    outline: none;
}

.kp-form__input--textarea {
    resize: vertical;
    min-height: 100px;
}

.kp-form__input--select {
    appearance: auto;
}

.kp-form__input--file {
    padding: 8px;
    border-style: dashed;
}

/* === Error State === */
.kp-form__field--error .kp-form__input {
    border-color: #dc3232;
}

.kp-form__field--error .kp-form__input:focus {
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.15);
}

.kp-form__error {
    display: block;
    margin-top: 4px;
    color: #dc3232;
    font-size: 13px;
}

.kp-form__global-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef3f3;
    border: 1px solid #dc3232;
    border-radius: 4px;
    color: #dc3232;
    font-size: 14px;
}

/* === Checkbox & Radio Groups === */
.kp-form__fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.kp-form__checkbox-group,
.kp-form__radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kp-form__checkbox-label,
.kp-form__radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
}

.kp-form__checkbox,
.kp-form__radio {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* === File Upload === */
.kp-form__file-info {
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

/* === Navigation === */
.kp-form__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    gap: 12px;
}

.kp-form__btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    line-height: 1;
}

.kp-form__btn:active {
    transform: scale(0.98);
}

.kp-form__btn--prev {
    background: #f0f0f0;
    color: #555;
}

.kp-form__btn--prev:hover {
    background: #e0e0e0;
}

.kp-form__btn--next {
    background: #0073aa;
    color: #fff;
    margin-left: auto;
}

.kp-form__btn--next:hover {
    background: #005f8c;
}

.kp-form__btn--submit {
    background: #4caf50;
    color: #fff;
    margin-left: auto;
}

.kp-form__btn--submit:hover {
    background: #43a047;
}

.kp-form__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Loading === */
.kp-form__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    color: #666;
    font-size: 14px;
}

.kp-form__spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: kp-spin 0.6s linear infinite;
}

@keyframes kp-spin {
    to { transform: rotate(360deg); }
}

/* === Success === */
.kp-form__success {
    padding: 24px;
    background: #eaf7ea;
    border: 1px solid #4caf50;
    border-radius: 4px;
    color: #2e7d32;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
}

/* === Honeypot (für Bots unsichtbar) === */
.kp-form__honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* === Responsive === */
@media (max-width: 480px) {
    .kp-form-wrapper {
        padding: 0 12px;
    }

    .kp-form__btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .kp-form__progress-label {
        display: none;
    }
}
