.sp-wrap{ padding:18px 0 0; background:var(--surface); color:var(--text); }
.sp-wrap *{ box-sizing:border-box; }

.sp-hero{
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    box-shadow:var(--shadow-soft);
    padding:14px;
    margin-bottom:14px;
}
.sp-hero__left{ display:flex; gap:12px; align-items:flex-start; }
.sp-hero__txt{ min-width:0; }

.sp-h1{ margin:0 0 6px; font-size:22px; font-weight: 600; letter-spacing:-.01em; padding-top: 0px; }
.sp-sub{ color:var(--muted); font-weight: 600; font-size:13.5px; }

.sp-logo{
    width:56px; height:56px;
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--surface-2);
    display:flex; align-items:center; justify-content:center;
    padding:8px;
    overflow:hidden;
    flex:0 0 auto;
}
.sp-logo img{ max-width:100%; max-height:100%; object-fit:contain; display:block; }

.sp-badges{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.sp-badge{
    display:inline-flex; align-items:center; gap:8px;
    padding:6px 10px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--surface-2);
    font-weight: 600;
    font-size:12.5px;
}

.sp-grid{
    display:grid;
    grid-template-columns: 1.35fr 380px;
    gap:14px;
    align-items:start;
}
@media (max-width:980px){
    .sp-grid{ grid-template-columns:1fr; }
}

.sp-box{
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    padding:14px;
    margin-bottom:14px;
}
.sp-h2{
    margin:0 0 10px;
    font-size:15px;
    font-weight: 600;
    display:flex; align-items:center; gap:10px;
}
.sp-rich{ color:var(--muted); font-weight: 600; font-size:13.8px; line-height:1.6; }
.sp-rich p{ margin:0 0 10px; }

.kv{ display:grid; gap:8px; }
.kv__row{
    display:grid;
    grid-template-columns: 170px 1fr;
    gap:10px;
    padding:6px 0;
    border-bottom:1px dashed rgba(0,0,0,.10);
}
.kv__row:last-child{ border-bottom:none; }
.kv__k{ font-weight: 600; color:var(--muted); font-size:13px; }
.kv__v{ font-weight: 600; color:var(--text); font-size:13px; }
.kv__v a{ color:var(--text); text-decoration:underline; }

.sp-applybtn{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    width:100%;
    padding:12px 12px;
    text-decoration:none;
    color:var(--text);
    border:1px solid var(--border);
    border-radius:14px;
    background:var(--surface-2);
}
.sp-applybtn:hover{ background:rgba(0,0,0,0.03); }
.sp-applybtn__left{ display:flex; align-items:center; gap:12px; min-width:0; }
.sp-applybtn__txt{ display:grid; gap:2px; min-width:0; }
.sp-applybtn__title{ font-weight: 600; font-size:14px; line-height:1.2; }
.sp-applybtn__sub{ font-size:12.5px; color:var(--muted); font-weight: 600; line-height:1.2; }
.sp-applybtn__extern{
    display:inline-flex; align-items:center; gap:8px;
    padding:6px 10px;
    border-radius:999px;
    border:1px dashed var(--border);
    background:var(--surface);
    color:var(--muted);
    font-weight: 600;
    font-size:12px;
    white-space:nowrap;
}

/* Map größer + stabil */
.sp-map{
    height: 300px;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface-2);
}

@media (max-width: 800px){
    .sp-map{
    height: 220px;
    }
}

.sp-bottom{
    margin: 8px 0 18px;
    display:flex;
    justify-content:center;
}
.sp-backbtn{
    display:inline-flex; align-items:center; gap:10px;
    text-decoration:none;
    padding:12px 14px;
    border-radius:14px;
    border:1px solid var(--border);
    background:var(--surface);
    box-shadow:var(--shadow-soft);
    color:var(--text);
    font-weight: 600;
}
.sp-backbtn:hover{ box-shadow:var(--shadow); }

/* Hero rechts (Favorit) */
.sp-hero{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
}

.sp-hero__right{
    flex: 0 0 auto;
}

/* Favoriten-Button */
.sp-favbtn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border-radius:999px;
    border:1px solid var(--border);
    background:var(--surface-2);
    color:var(--text);
    font-weight: 600;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
}
.sp-favbtn:hover{ background:rgba(0,0,0,0.03); }
.sp-favbtn i{ font-size:18px; line-height:1; }

.sp-favbtn.is-active{
    border-color: rgba(166,71,63,.35);
    background: rgba(166,71,63,.08);
}
.sp-favbtn.is-active i{
    color: var(--berry);
}

/* Mobil: Text ausblenden, nur Herz */
@media (max-width: 520px){
    .sp-favbtn__txt{ display:none; }
    .sp-favbtn{ padding:10px 11px; }
}


/* Aktionen über dem Grid */
.sp-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin: 10px 0 14px;
    flex-wrap:wrap;
}

.sp-actbtn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 12px;
    border-radius:999px;
    border:1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor:pointer;
    font-weight: 600;
    font-size:14px;
}
.sp-actbtn:hover{ filter:brightness(.98); }
.sp-actbtn:active{ transform: translateY(1px); }

/* Bewerbungsbox: Button + Merken nebeneinander */
.sp-applyrow{
    display:flex;
    gap:10px;
    align-items:stretch;
}

.sp-applyrow .sp-applybtn{
    flex:1 1 auto;
}

/* Extern klein und dezenter unter dem Text */
.sp-applybtn__meta{
    margin-top: 6px;
    font-size: 12px;
    opacity: .70;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

/* Merken rechts als kompakter Button */
.sp-favbtn--mini{
    flex: 0 0 auto;
    width: 130px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor:pointer;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding: 10px 10px;
}
.sp-favbtn--mini i{ font-size: 18px; }

/* Active State (optional, falls du schon is-active nutzt) */
.sp-favbtn.is-active{
    border-color: rgba(166,71,63,.35);
    background: rgba(166,71,63,.08);
}



/* Mini-Toast für "Link kopiert" */
.sp-toast{
    position:fixed;
    left:50%;
    bottom:16px;
    transform:translateX(-50%);
    padding:10px 12px;
    border-radius:14px;
    border:1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
    font-size:14px;
    z-index:9999;
}

/* Druck: Buttons ausblenden */
@media print{
    .sp-actions,
    .sp-bottom,
    .sp-favbtn{
        display:none !important;
    }
}



/* =========================
   Bewerbungs-Popup
========================= */
.sp-modal[hidden]{
    display:none !important;
}

.sp-modal{
    position:fixed;
    inset:0;
    z-index:1400;
}

.sp-modal__backdrop{
    position:absolute;
    inset:0;
    background:rgba(13, 24, 28, .52);
    backdrop-filter:blur(3px);
}

.sp-modal__dialog{
    position:relative;
    width:min(640px, calc(100% - 24px));
    max-height:calc(100dvh - 24px);
    overflow:auto;
    margin:12px auto;
    border:1px solid var(--border);
    border-radius:28px;
    background:var(--surface);
    box-shadow:0 24px 70px rgba(0,0,0,.18);
}

.sp-modal__head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:22px 24px 16px;
    border-bottom:1px solid rgba(0,0,0,.06);
}

.sp-modal__title{
    margin:0;
    font-size:18px;
    font-weight: 600;
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--text);
}

.sp-modal__close{
    width:44px;
    height:44px;
    border:none;
    border-radius:999px;
    background:var(--surface-2);
    color:var(--text);
    cursor:pointer;
    flex:0 0 auto;
    font-size:20px;
}

.sp-modal__close:hover{
    filter:brightness(.98);
}

.sp-modal__body{
    padding:22px 24px 18px;
}

.sp-modal__intro{
    display:grid;
    gap:8px;
    margin-bottom:18px;
}

.sp-modal__intro p{
    margin:0;
    font-size:15px;
    line-height:1.55;
    color:var(--text);
    font-weight: 600;
}

.sp-modal__alert{
    display:flex;
    gap:12px;
    align-items:flex-start;
    padding:14px 16px;
    margin-bottom:16px;
    border-radius:18px;
    background:rgba(166,71,63,.08);
    border:1px solid rgba(166,71,63,.18);
}

.sp-modal__alerticon{
    width:28px;
    height:28px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    background:rgba(166,71,63,.12);
    color:var(--berry);
    margin-top:1px;
}

.sp-modal__alerttext{
    font-size:14px;
    line-height:1.5;
    color:var(--text);
    font-weight: 600;
}



.sp-modal__checks{
    display:grid;
    gap:10px;
}

.sp-check{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:14px 16px;
    border-radius:18px;
    background:var(--surface-2);
    cursor:pointer;
    font-size:15px;
    line-height:1.45;
    font-weight: 600;
    color:var(--text);
}

.sp-check input{
    margin-top:3px;
    width:18px;
    height:18px;
    flex:0 0 auto;
}

.sp-modal__foot{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:0 24px 24px;
    flex-wrap:wrap;
}

.sp-modal__foot .sp-actbtn{
    min-width:140px;
    justify-content:center;
    border-radius:999px;
    padding:13px 18px;
}

.sp-actbtn--primary{
    background: var(--primary);
    border-color: var(--primary);
    color: var(--c-blueblack);
    box-shadow: none;
}
.sp-actbtn--primary:not([disabled]):hover{
    filter:brightness(.98);
}

.sp-actbtn--primary[disabled]{
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.08);
}

body.sp-modal-open{
    overflow:hidden;
}

@media (max-width: 640px){
    .sp-modal__dialog{
        width:min(100%, calc(100% - 12px));
        max-height:calc(100dvh - 12px);
        margin:6px auto;
        border-radius:24px;
    }

    .sp-modal__head{
        padding:18px 16px 14px;
    }

    .sp-modal__body{
        padding:18px 16px 16px;
    }

    .sp-modal__foot{
        padding:0 16px 16px;
    }

    .sp-modal__foot .sp-actbtn{
        flex:1 1 100%;
    }

    .sp-modal__title{
        font-size:17px;
    }

    .sp-check{
        font-size:14px;
    }
}


.sp-applybox__actions{
    display: none;
}





.sp-applybtn--disabled{
    pointer-events: none;
    opacity: .55;
    filter: grayscale(1);
    cursor: not-allowed;
}

.sp-applyhint{
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f6f7f8;
    border: 1px solid rgba(0,0,0,.08);
    line-height: 1.5;
    font-size: .97rem;
}




.sp-mapbox{
    position: relative;
    border-radius: 18px;
    overflow: hidden;
}

.sp-map{
    height: 300px;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    background:
        linear-gradient(rgba(68,101,115,.14), rgba(68,101,115,.14)),
        var(--surface-2);
}

.sp-mapconsent{
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(61,76,83,.30);
    backdrop-filter: blur(2px);
}

.sp-mapconsent[hidden]{
    display: none !important;
}

.sp-mapconsent__panel{
    width: min(100%, 700px);
    padding: 28px 30px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 22px;
    background: rgba(47,59,64,.86);
    box-shadow: 0 18px 44px rgba(0,0,0,.18);
    color: #fff;
}

.sp-mapconsent__title{
    margin: 0 0 18px;
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
    line-height: 1.02;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
}

.sp-mapconsent__text{
    margin: 0 0 14px;
    max-width: 58ch;
    font-size: .98rem;
    line-height: 1.55;
    color: rgba(255,255,255,.96);
}

.sp-mapconsent__btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    min-height: 52px;
    padding: 0 22px;
    margin-top: 8px;
    border: 1px solid #c7d67a;
    border-radius: 14px;
    background: var(--primary);
    color: var(--c-blueblack);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: .18s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

.sp-mapconsent__btn:hover{
    transform: translateY(-1px);
    filter: brightness(.98);
}

.sp-mapreset{
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 420;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(61,76,83,.18);
    border-radius: 10px;
    background: rgba(255,255,255,.92);
    color: var(--c-blueblack);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.10);
    transition: .18s ease;
    backdrop-filter: blur(3px);
}

.sp-mapreset:hover{
    background: #fff;
    border-color: rgba(61,76,83,.28);
}

.sp-mapreset[hidden]{
    display: none !important;
}

@media (max-width: 800px){
    .sp-map{
        height: 220px;
    }

    .sp-mapconsent{
        padding: 14px;
    }

    .sp-mapconsent__panel{
        padding: 18px 16px;
        border-radius: 18px;
    }

    .sp-mapconsent__title{
        font-size: 1.6rem;
    }

    .sp-mapconsent__text{
        font-size: .9rem;
        line-height: 1.45;
    }

    .sp-mapconsent__btn{
        width: 100%;
        min-width: 0;
    }

    .sp-mapreset{
        right: 10px;
        bottom: 10px;
        min-height: 32px;
        padding: 0 10px;
        font-size: .76rem;
    }
}
