/* =========================================================
   UNTER DEN STERNEN – Charakterprofil-Integration
   Wird bei Aktivierung als astrology_profile.css im ACP angelegt.
   ========================================================= */

.astrology-profile-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border: 1px solid rgba(160, 119, 62, .42);
    background: rgba(8, 9, 13, .94);
    color: #aaa6ad;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .32);
}

.astrology-profile-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, .035);
    pointer-events: none;
}

.astrology-profile-card > * {
    position: relative;
    z-index: 1;
}

.astrology-profile-head {
    padding: 8px 0 28px;
    border-bottom: 1px solid rgba(160, 119, 62, .25);
    text-align: center;
}

.astrology-profile-kicker,
.astrology-profile-label {
    display: block;
    color: #86527f;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.astrology-profile-symbol {
    margin: 10px 0 4px;
    color: #8d5886;
    font-size: 54px;
    line-height: 1;
}

.astrology-profile-head h2 {
    margin: 0;
    color: #d2cdd0;
    font: 400 28px Georgia, "Times New Roman", serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.astrology-profile-dates {
    display: block;
    margin-top: 7px;
    color: #77717a;
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.astrology-profile-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid rgba(160, 119, 62, .22);
}

.astrology-profile-facts > div {
    padding: 18px;
    border-right: 1px solid rgba(160, 119, 62, .18);
    text-align: center;
}

.astrology-profile-facts > div:last-child {
    border-right: 0;
}

.astrology-profile-facts span {
    display: block;
    margin-bottom: 5px;
    color: #6f6872;
    font-size: 8px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.astrology-profile-facts strong {
    color: #c3bdc0;
    font: 400 14px Georgia, "Times New Roman", serif;
}

.astrology-profile-section {
    padding: 24px 4px 0;
    line-height: 1.85;
}

.astrology-profile-section .astrology-profile-label {
    margin-bottom: 8px;
}

.astrology-profile-traits {
    color: #b18aae;
    font: italic 13px Georgia, "Times New Roman", serif;
}

.astrology-profile-moon-note {
    margin-top: 22px;
    padding: 18px 20px;
    border-left: 2px solid #86527f;
    background: rgba(82, 44, 79, .06);
}

.astrology-profile-horoscope {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid rgba(160, 119, 62, .24);
    background: rgba(255, 255, 255, .015);
    line-height: 1.85;
}

.astrology-profile-horoscope:has(h3:empty):has(div:empty) {
    display: none;
}

.astrology-profile-horoscope h3 {
    margin: 7px 0 9px;
    color: #c9c3c6;
    font: 400 16px Georgia, "Times New Roman", serif;
}

.astrology-profile-footer {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid rgba(160, 119, 62, .20);
}

.astrology-profile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #a77d45;
    font-size: 9px;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

.astrology-profile-link:hover {
    color: #c19559;
}

.astrology-profile-link span:first-child {
    color: #86527f;
    font-size: 17px;
}

/* Bereits für die spätere Wesensarten-Astrologie vorbereitet. */
.astrology-species-note {
    margin-top: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(134, 82, 127, .28);
    background: rgba(82, 44, 79, .05);
}

@media (max-width: 650px) {
    .astrology-profile-card {
        padding: 24px;
    }

    .astrology-profile-facts {
        grid-template-columns: 1fr;
    }

    .astrology-profile-facts > div {
        border-right: 0;
        border-bottom: 1px solid rgba(160, 119, 62, .16);
    }

    .astrology-profile-facts > div:last-child {
        border-bottom: 0;
    }
}

/* =========================================================
   ASTROLOGIE POPUP
   ========================================================= */

.astro-popup-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 16px;

    border: 1px solid rgba(180, 135, 71, .45);
    background: rgba(8, 9, 13, .75);

    color: #b88a48;

    font-size: 9px;
    letter-spacing: .13em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        border-color .2s ease,
        color .2s ease,
        background .2s ease;
}

.astro-popup-open:hover {
    border-color: #b88a48;
    background: rgba(184, 138, 72, .06);
    color: #d1aa71;
}


/* =========================================================
   ASTROLOGIE POPUP – STACKING FIX
   ========================================================= */

.astro-popup-overlay {
    position: fixed !important;
    inset: 0 !important;

    z-index: 999999 !important;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, .82);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    isolation: isolate;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.astro-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Das eigentliche Fenster */

.astro-popup {
  position: relative;
  z-index: 1000000 !important;
  width: min(760px, 95vw);
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease;
}

.astro-popup-overlay.is-open .astro-popup {
    transform: translateY(0) scale(1);
}


/* Inhalt ebenfalls sicher über allen Pseudoelementen */

.astro-popup > * {
    position: relative;
    z-index: 2;
}


/* Innerer Rahmen */

.astro-popup::before {
    content: "";

    position: absolute;
    inset: 10px;

    z-index: 1;

    pointer-events: none;

    border: 1px solid rgba(255, 255, 255, .04);
}


/* Schließen-Button */

.astro-popup-close {
    position: absolute !important;

    top: 14px;
    right: 16px;

    z-index: 10 !important;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 1px solid rgba(180, 135, 71, .35);
    background: #090a0f;

    color: #8f858e;

    font-family: Georgia, serif;
    font-size: 20px;

    cursor: pointer;
}

.astro-popup-close:hover {
    border-color: #b88a48;
    color: #b88a48;
}


/* Scrollbar */

.astro-popup::-webkit-scrollbar {
    width: 5px;
}

.astro-popup::-webkit-scrollbar-track {
    background: #090a0f;
}

.astro-popup::-webkit-scrollbar-thumb {
    background: #5d482c;
}


/* Mobil */

@media (max-width: 650px) {

    .astro-popup-overlay {
        padding: 12px;
    }

    .astro-popup {
        width: 100%;
        max-height: 92vh;
        padding: 25px 17px;
    }

}