/* ================================================
   79ACADEMY BEWERBUNG — Frontend Styles
   Prefix: bw- (Bewerbung)
   Design System: project-docs/DESIGN-SYSTEM.md
   ================================================ */

/* ================================================
   PAGE CHROME — Header & Footer ausblenden
   Diese CSS-Datei laedt nur auf der Bewerbungs-Seite
   (Shortcode-gebunden), daher treffen diese Regeln
   ausschliesslich dort.
   ================================================ */
header.site-header {
    display: none;
}

.site-footer,
footer.site-info {
    display: none;
}

/* Container */
.bw-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #FFFFFF;
}

/* Header */
.bw-header {
    text-align: center;
    margin-bottom: 32px;
}

.bw-logo-link {
    display: block;
    margin: 0 auto 16px;
    width: fit-content;
}

.bw-logo {
    display: block;
    max-height: 64px;
    width: auto;
}

.bw-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Form */
.bw-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Honeypot (unsichtbar) */
.bw-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Field */
.bw-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bw-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.bw-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* ================================================
   INPUTS — Scoped unter .bw-container fuer
   Specificity-Schutz gegen Theme-Overrides.
   Alle Felder (text, email, number, select, textarea)
   haben identischen Look.
   ================================================ */
.bw-container .bw-input {
    width: 100%;
    padding: 12px 16px;
    min-height: 48px;
    background: #141821;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

/* Theme Color Override — element+class Specificity (0-2-1 / 0-2-2 mit :focus)
   schlaegt GP Customizer inline CSS auf input/select/textarea */
.bw-container input.bw-input,
.bw-container select.bw-input,
.bw-container textarea.bw-input,
.bw-container input.bw-input:focus,
.bw-container select.bw-input:focus,
.bw-container textarea.bw-input:focus {
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
}

.bw-container .bw-input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.bw-container .bw-input:focus {
    outline: none;
    border-color: #2F80FF;
    box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.15);
    background: #141821;
}

.bw-container .bw-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
}

/* iOS / Safari Autofill Override
   Apple/WebKit setzt sonst gelben Hintergrund + eigene Textfarbe. */
.bw-container input.bw-input:-webkit-autofill,
.bw-container input.bw-input:-webkit-autofill:hover,
.bw-container input.bw-input:-webkit-autofill:focus,
.bw-container textarea.bw-input:-webkit-autofill,
.bw-container textarea.bw-input:-webkit-autofill:hover,
.bw-container textarea.bw-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF;
    caret-color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-box-shadow: 0 0 0 1000px #141821 inset;
    box-shadow: 0 0 0 1000px #141821 inset;
    transition: background-color 9999s ease-out 0s, color 9999s ease-out 0s;
}

.bw-container input.bw-input:-webkit-autofill:focus,
.bw-container textarea.bw-input:-webkit-autofill:focus {
    border-color: #2F80FF;
    -webkit-box-shadow: 0 0 0 1000px #141821 inset, 0 0 0 3px rgba(47, 128, 255, 0.15);
    box-shadow: 0 0 0 1000px #141821 inset, 0 0 0 3px rgba(47, 128, 255, 0.15);
}

/* Select */
.bw-container .bw-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.bw-container .bw-select option {
    background: #141821;
    color: #FFFFFF;
}

/* Textarea */
.bw-container .bw-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Character Count */
.bw-char-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: right;
}

/* Error Messages */
.bw-error {
    font-size: 13px;
    color: #F44336;
    min-height: 0;
    transition: all 0.2s ease;
}

.bw-error:empty {
    display: none;
}

.bw-container .bw-input.bw-invalid {
    border-color: #F44336;
}

.bw-container .bw-input.bw-invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15);
    background: #141821;
}

/* Global Error */
.bw-global-error {
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 10px;
    color: #F44336;
    font-size: 14px;
    text-align: center;
}

/* Checkbox */
.bw-checkbox-field {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

.bw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.bw-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 2px;
    accent-color: #2F80FF;
    cursor: pointer;
}

.bw-checkbox-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.bw-checkbox-text a {
    color: #2F80FF;
    text-decoration: none;
}

.bw-checkbox-text a:hover {
    color: #60A5FF;
    text-decoration: underline;
}

.bw-checkbox-text a:focus {
    outline: 2px solid #2F80FF;
    outline-offset: 2px;
}

/* Submit Button */
.bw-submit {
    width: 100%;
    padding: 14px 24px;
    background: #2F80FF;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    min-height: 48px;
}

.bw-submit:hover {
    background: #60A5FF;
    transform: scale(1.02);
}

.bw-submit:active {
    transform: scale(0.98);
}

.bw-submit:focus {
    outline: 2px solid #2F80FF;
    outline-offset: 2px;
}

.bw-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bw-submit-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Success State */
.bw-success {
    text-align: center;
    padding: 48px 16px;
    animation: bw-fadeIn 0.4s ease-out;
}

.bw-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #4CAF50;
}

.bw-success-icon svg {
    width: 100%;
    height: 100%;
}

.bw-success-title {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 12px;
}

.bw-success-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

/* Animations */
@keyframes bw-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (min-width: 768px) {
    .bw-container {
        padding: 48px 24px 64px;
    }

    .bw-logo {
        max-height: 80px;
    }

    .bw-subtitle {
        font-size: 18px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .bw-success {
        animation: none;
    }

    .bw-submit:hover,
    .bw-submit:active {
        transform: none;
    }

    .bw-container .bw-input,
    .bw-error {
        transition: none;
    }
}
