/* mod_pwkontakt – Generic Contact Form
   Neutral design, easily overridable via template user.css
   All selectors use .pwk- prefix */

.pwk-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* Form container */
.pwk-wrap .pwk-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 36px 32px;
    box-sizing: border-box;
}

/* Rows */
.pwk-wrap .pwk-row {
    margin-bottom: 20px;
}

.pwk-wrap .pwk-row:last-child {
    margin-bottom: 0;
}

.pwk-wrap .pwk-row-2col {
    display: flex;
    gap: 20px;
}

.pwk-wrap .pwk-full {
    width: 100%;
}

.pwk-wrap .pwk-half {
    flex: 1 1 0;
    min-width: 0;
}

/* Labels */
.pwk-wrap .pwk-field > label {
    display: block;
    float: none;
    width: auto;
    text-align: left;
    color: #555;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 8px;
    padding: 0;
}

.pwk-wrap .pwk-req {
    color: #c00;
    font-weight: 600;
}

/* Inputs & Textarea */
.pwk-wrap .pwk-field input[type="text"],
.pwk-wrap .pwk-field input[type="email"],
.pwk-wrap .pwk-field textarea {
    display: block;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.925rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #333;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    height: auto;
    line-height: 1.5;
}

.pwk-wrap .pwk-field input[type="text"]:focus,
.pwk-wrap .pwk-field input[type="email"]:focus,
.pwk-wrap .pwk-field textarea:focus {
    border-color: #0070c0;
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.15);
    outline: none;
}

.pwk-wrap .pwk-field input::placeholder,
.pwk-wrap .pwk-field textarea::placeholder {
    color: #999;
    opacity: 0.8;
}

/* Error state */
.pwk-wrap .pwk-input-error,
.pwk-wrap input.pwk-input-error,
.pwk-wrap textarea.pwk-input-error {
    border-color: #DC2626 !important;
}

/* Tooltip-style error messages */
.pwk-wrap .pwk-tip {
    position: relative;
    background: #FEF2F2;
    color: #DC2626;
    font-size: 0.82rem;
    padding: 8px 14px;
    border-radius: 8px;
    margin-top: 8px;
    display: inline-block;
    max-width: 100%;
    line-height: 1.4;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.pwk-wrap .pwk-tip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #FEF2F2;
}

/* Privacy checkbox */
.pwk-wrap .pwk-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    float: none;
    width: auto;
    line-height: 1.5;
}

.pwk-wrap .pwk-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: auto;
    accent-color: #0070c0;
}

.pwk-wrap .pwk-privacy-link {
    font-weight: 600;
    color: #0070c0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pwk-wrap .pwk-privacy-link:hover {
    color: #005a9e;
}

/* Honeypot */
.pwk-wrap .pwk-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
    visibility: hidden;
}

/* Submit button – neutral, easily overridable via user.css */
.pwk-wrap .pwk-btn-submit {
    display: inline-block;
    background: #0070c0;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 30px;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    text-align: center;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}

.pwk-wrap .pwk-btn-submit:hover {
    background: #005a9e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.pwk-wrap .pwk-btn-submit:active {
    transform: translateY(0);
}

.pwk-wrap .pwk-btn-submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Overlay / Lightbox */
.pwk-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}

.pwk-overlay-box {
    background: #fff;
    border-radius: 12px;
    padding: 44px 36px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: pwk-fadeIn 0.3s ease;
}

@keyframes pwk-fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwk-overlay-title {
    color: #0070c0;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.pwk-overlay-title.pwk-overlay-error {
    color: #DC2626;
}

.pwk-overlay-text {
    color: #333;
    font-size: 1rem;
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.pwk-overlay .pwk-btn-submit {
    display: inline-block;
    width: auto;
    padding: 12px 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .pwk-wrap .pwk-row-2col {
        flex-direction: column;
        gap: 0;
    }

    .pwk-wrap .pwk-half {
        width: 100%;
        margin-bottom: 20px;
    }

    .pwk-wrap .pwk-form {
        padding: 24px 18px;
        border-radius: 8px;
    }
}
