/* ─── DWG Formularz – Styl jasny, Montserrat ─── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

#dwg-app {
    max-width: 640px;
    margin: 2rem auto;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    line-height: 1.6;
    font-size: 14px;
    text-align: left;
}
#dwg-app * {
    text-align: center;
}
#dwg-app .dwg-field,
#dwg-app .dwg-field *,
#dwg-app .dwg-section-header,
#dwg-app .dwg-section-header *,
#dwg-app .dwg-nav,
#dwg-app .dwg-error,
#dwg-app .dwg-preview-bar,
#dwg-app .dwg-preview-bar * {
    text-align: left;
}
#dwg-app .dwg-preview-bar--tight,
#dwg-app .dwg-preview-bar--tight * {
    text-align: center;
}
#dwg-app .dwg-step-label {
    text-align: right;
}
#dwg-app .dwg-counter {
    text-align: right;
}
#dwg-app .dwg-logo {
    margin-left: auto;
    margin-right: auto;
}

/* Logo */
.dwg-logo {
    display: block;
    max-width: 200px;
    margin: 0 auto 1.2rem;
}

/* Progress */
.dwg-progress {
    height: 5px;
    background: #e8e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.dwg-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7b2ff7, #c471f5);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.dwg-step-label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 1.5rem;
    text-align: right;
}

/* Steps */
.dwg-step { display: none; }
.dwg-step.active {
    display: block;
    animation: dwgFadeIn 0.35s ease;
}
@keyframes dwgFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Intro */
.dwg-intro p {
    margin-bottom: 0.8rem;
    color: #444;
    font-size: 0.88rem;
    text-align: center;
}
.dwg-intro strong { color: #7b2ff7; }

/* Section Header */
.dwg-section-header {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.5rem;
}
.dwg-section-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px; min-width: 32px;
    background: #7b2ff7;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
}
.dwg-section-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    color: #222;
}
.dwg-section-desc {
    color: #777;
    font-size: 0.82rem;
    margin: 0;
    text-align: center;
}

/* Fields */
.dwg-field { margin-bottom: 1.3rem; }
.dwg-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: #333;
}
.dwg-field .req { color: #e03e6a; }
.dwg-hint {
    font-size: 0.78rem;
    color: #888;
    margin: 0 0 0.4rem;
    line-height: 1.5;
    text-align: center;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 2px solid #e0e0e8;
    border-radius: 7px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #222;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #7b2ff7;
    box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.1);
}
textarea { resize: vertical; min-height: 90px; }
input.dwg-invalid, select.dwg-invalid, textarea.dwg-invalid {
    border-color: #e03e6a;
    box-shadow: 0 0 0 3px rgba(224, 62, 106, 0.08);
}

select option {
    font-size: 0.85rem;
}

.dwg-counter {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: #bbb;
    margin-top: 0.2rem;
}

/* Radio group */
.dwg-radio-group { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.5rem; }
.dwg-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e8e8f0;
    border-radius: 7px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-weight: 400;
    font-size: 0.85rem;
    color: #444;
}
.dwg-radio:hover {
    border-color: #c4a6f7;
    background: #faf7ff;
}
.dwg-radio input[type="radio"] {
    display: none;
}
.dwg-radio input[type="radio"]:checked + span { font-weight: 600; color: #fff; }
.dwg-radio:has(input:checked) {
    border-color: #7b2ff7;
    background: linear-gradient(135deg, #7b2ff7, #a855f7);
    color: #fff;
}
.dwg-radio-group.dwg-invalid .dwg-radio { border-color: #e03e6a; }

/* Navigation */
.dwg-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #eee;
}
.dwg-btn {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}
.dwg-btn:active { transform: scale(0.97); }
.dwg-btn-back { background: #f0f0f5; color: #666; }
.dwg-btn-back:hover { background: #e4e4ec; }
.dwg-btn-back.hidden { visibility: hidden; }
.dwg-btn-next, .dwg-btn-submit {
    background: linear-gradient(135deg, #7b2ff7, #a855f7);
    color: #fff;
}
.dwg-btn-next:hover, .dwg-btn-submit:hover {
    background: linear-gradient(135deg, #6a1fe0, #9740e8);
}
.dwg-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Error */
.dwg-error {
    background: #fef2f5;
    color: #c0294a;
    padding: 0.6rem 0.9rem;
    border-radius: 7px;
    margin-top: 0.8rem;
    font-size: 0.82rem;
    border-left: 3px solid #e03e6a;
}

/* Success */
.dwg-success {
    text-align: center;
    padding: 2rem 1rem;
}
.dwg-success-icon {
    width: 54px; height: 54px;
    background: linear-gradient(135deg, #7b2ff7, #a855f7);
    color: #fff;
    font-size: 1.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.dwg-success h3 {
    font-size: 1.15rem;
    margin: 0 0 0.6rem;
    color: #222;
    font-weight: 700;
}
.dwg-success p {
    color: #555;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}
.dwg-success a {
    color: #7b2ff7;
    text-decoration: none;
    font-weight: 600;
}
.dwg-success a:hover { text-decoration: underline; }

/* ─── Applications not open yet ─── */
#dwg-closed-app {
    max-width: 560px;
    margin: 2rem auto;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #222;
    line-height: 1.6;
    font-size: 14px;
    text-align: center;
}
.dwg-closed {
    position: relative;
    background: #fff;
    border: 1px solid #ece9f5;
    border-radius: 16px;
    padding: 2.6rem 1.8rem 2rem;
    box-shadow: 0 12px 32px rgba(123, 47, 247, 0.08);
    overflow: hidden;
}
/* Same gradient as the progress bar, as a rule along the top of the card. */
.dwg-closed::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7b2ff7, #c471f5);
}

/* Calendar icon */
.dwg-closed-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1.3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2ff7, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(123, 47, 247, 0.26);
}
.dwg-closed-icon svg {
    width: 27px;
    height: 27px;
    display: block;
    color: #fff;
}

.dwg-closed h2 {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    color: #222;
    margin: 0 0 1rem;
}
.dwg-closed p {
    color: #555;
    font-size: 0.9rem;
    margin: 0 auto 0.9rem;
    max-width: 42ch;
}
.dwg-closed strong { color: #7b2ff7; }
/* The programme name gets its own line so it never breaks mid-phrase. */
.dwg-closed-name {
    display: block;
    margin: 0.2rem 0;
}

.dwg-closed-btn {
    display: inline-block;
    margin: 1.4rem 0 0;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #7b2ff7, #a855f7);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(123, 47, 247, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dwg-closed-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(123, 47, 247, 0.34);
    text-decoration: none;
}

/* Doubled class: `.dwg-closed p` outranks a lone class and would zero margin-top. */
.dwg-closed .dwg-closed-foot {
    margin-top: 1.4rem;
    font-size: 0.8rem;
    color: #888;
}
.dwg-closed-foot a {
    color: #7b2ff7;
    font-weight: 600;
    text-decoration: none;
}
.dwg-closed-foot a:hover { text-decoration: underline; }

/* ─── Preview-mode banner ─── */
.dwg-preview-bar {
    background: #fff8e6;
    border: 1px solid #f4e3b0;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1.2rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #7a5a12;
}
.dwg-preview-bar strong { color: #7a5a12; }
.dwg-preview-bar--tight { margin: 0 0 1.2rem; }

/* Mobile */
@media (max-width: 600px) {
    #dwg-closed-app { margin: 1rem; }
    .dwg-closed { padding: 2rem 1.2rem 1.6rem; }
    .dwg-closed h2 { font-size: 1.15rem; }

    #dwg-app { margin: 1rem; }
    .dwg-btn { padding: 0.55rem 1rem; font-size: 0.82rem; }
    .dwg-logo { max-width: 160px; }
}

/* Notice shown when the mentor picks were carried over from the mentor page. */
.dwg-prefill-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-left: 3px solid #B375EF;
    background: rgba(179, 117, 239, 0.1);
    font-size: 0.85rem;
    line-height: 1.45;
}
.dwg-prefill-note[hidden] { display: none; }
