/* Public-only skin for Sentinel search to match Breach2Bz look */

/* Empêche l'apparition d'un fond blanc lors du sur-scroll (haut/bas). */
html,
body {
    background-color: #000 !important;
}

body.ps-public {
    min-height: 100vh;
    background-color: #000 !important;
    background:
        radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.18), transparent 32%),
        radial-gradient(circle at 80% 20%, rgba(76, 143, 255, 0.14), transparent 28%),
        radial-gradient(circle at 55% 75%, rgba(52, 179, 255, 0.09), transparent 40%),
        linear-gradient(180deg, #000000 0%, #04030a 65%, #02020a 100%);
    overscroll-behavior-y: none;
}

body.ps-public::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(120, 170, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(120, 170, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.22;
}

/* Public header / nav — logo + texte et menu alignés verticalement */
body.ps-public .ps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(170, 120, 255, 0.12);
    padding: 14px 26px;
    overflow: visible;
}

.bp2-nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bp2-brand-home {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.bp2-brand-home .ps-app-title,
.bp2-brand-home .ps-app-subtitle {
    color: inherit;
}

/* Logo carré proportionné au texte SENTINEL + sous-titre */
.bp2-brand-home .ps-logo-circle {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
}

.bp2-brand-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.bp2-nav-dropdown-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 0;
}

.bp2-nav-dropdown {
    position: relative;
    overflow: visible;
}

.bp2-nav-dropdown-summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: rgba(170, 120, 255, 0.10);
    border: 1px solid rgba(170, 120, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
    user-select: none;
    gap: 10px;
    z-index: 80;
    min-width: 120px;
}

/* Masque le marqueur natif du <summary> */
.bp2-nav-dropdown-summary::-webkit-details-marker {
    display: none;
}

.bp2-nav-menu-icon {
    width: 18px;
    height: 12px;
    position: relative;
    display: inline-block;
}

.bp2-nav-menu-icon::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    box-shadow:
        0 5px 0 rgba(255, 255, 255, 0.92),
        0 10px 0 rgba(255, 255, 255, 0.92);
}

.bp2-nav-menu-text {
    display: inline-block;
}

/* Sur mobile : logo proportionné au texte */
@media (max-width: 520px) {
    .bp2-brand-home .ps-logo-circle {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        border-radius: 12px !important;
        margin: 0 !important;
    }


    .bp2-nav-menu-text {
        display: none;
    }
}

.bp2-nav-dropdown-list {
    display: none;
    position: absolute;
    left: auto;
    right: 0;
    top: calc(100% + 10px);
    padding: 10px;
    width: min(260px, calc(100vw - 24px));
    min-width: 0;
    border-radius: 16px;
    background: #000;
    backdrop-filter: blur(14px);
    border: 1px solid rgba(170, 120, 255, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    z-index: 200;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.bp2-nav-dropdown[open] .bp2-nav-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bp2-nav-carousel {
    display: none;
    width: 100%;
}

.bp2-nav-carousel-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
    scrollbar-width: none;
}

.bp2-nav-carousel-inner::-webkit-scrollbar {
    display: none;
}

.bp2-carousel-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    background: rgba(170, 120, 255, 0.10);
    border: 1px solid rgba(170, 120, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    user-select: none;
}

.bp2-carousel-pill:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(170, 120, 255, 0.14);
    border-color: rgba(170, 120, 255, 0.3);
}

.bp2-nav-dropdown-list a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    border-radius: var(--radius-pill);
    background: rgba(170, 120, 255, 0.06);
    border: 1px solid rgba(170, 120, 255, 0.14);
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bp2-nav-dropdown-list a:hover {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(170, 120, 255, 0.3);
    background: rgba(170, 120, 255, 0.12);
}

/* Icônes avant chaque item (ordre = dans le template) */
.bp2-nav-dropdown-list a::before {
    content: "";
    display: inline-block;
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.bp2-nav-dropdown-list a:nth-child(1)::before { content: "⌂"; }
.bp2-nav-dropdown-list a:nth-child(2)::before { content: "⌕"; }
.bp2-nav-dropdown-list a:nth-child(3)::before { content: "€"; }
.bp2-nav-dropdown-list a:nth-child(4)::before { content: "✉"; }
.bp2-nav-dropdown-list a:nth-child(5)::before { content: "●"; color: rgba(87, 255, 154, 0.95); }
.bp2-nav-dropdown-list a:nth-child(6)::before { content: "➤"; color: rgba(87, 255, 154, 0.95); }
.bp2-nav-dropdown-list a:nth-child(7)::before { content: "⇦"; color: rgba(87, 255, 154, 0.95); }

/* Séparation visuelle Navigation vs Discord/Telegram/Deconnexion */
.bp2-nav-dropdown-list a:nth-child(5) {
    border-top: 1px solid rgba(170, 120, 255, 0.18);
    padding-top: 14px;
}

.bp2-brand-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.ps-public .ps-app-title {
    font-size: 16px;
    letter-spacing: 1.8px;
}

body.ps-public .ps-app-subtitle {
    font-size: 12px;
}

.bp2-nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 20px;
}

.bp2-nav-links a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.bp2-nav-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.bp2-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp2-social-pill {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: rgba(170, 120, 255, 0.10);
    border: 1px solid rgba(170, 120, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

/* Make the logout look like a small pill */
body.ps-public .ps-header-pill {
    min-height: 36px;
}

/* Public layout */
body.ps-public .ps-main {
    width: min(calc(100% - 36px), 1120px);
    padding: 28px 0 60px;
    position: relative;
    z-index: 1;
}

body.ps-public .ps-search-section {
    margin-bottom: 18px;
}

body.ps-public .ps-search-card {
    background: rgba(10, 14, 32, 0.62);
    border: 1px solid rgba(170, 120, 255, 0.16);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

body.ps-public .ps-search-card-header {
    border-bottom: 1px solid rgba(170, 120, 255, 0.10);
}

/* Public titles */
body.ps-public .ps-section-title {
    font-size: 26px;
    letter-spacing: 0.3px;
}

body.ps-public .ps-section-subtitle {
    max-width: 680px;
}

/* Header responsive (mobile) */
@media (max-width: 520px) {
    /* Logo + texte et menu sur une seule ligne, centrés verticalement */
    body.ps-public .ps-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    body.ps-public .ps-header {
        padding: 10px 14px;
    }

    body.ps-public .bp2-nav-left {
        gap: 10px;
        flex: 0 1 auto;
        align-items: center;
    }

    body.ps-public .ps-app-title {
        font-size: 14px;
        letter-spacing: 1.2px;
    }

    body.ps-public .bp2-nav-dropdown-nav {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
    }

    body.ps-public .bp2-nav-dropdown-summary {
        width: 52px;
        height: 52px;
        min-height: 52px;
        min-width: 0;
        padding: 0;
        gap: 0;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.ps-public .bp2-nav-dropdown-list {
        left: auto;
        right: 0;
        width: calc(100vw - 24px);
        min-width: 0;
        max-width: 300px;
        /* Le fond doit rester bien opaque (sinon ça “fait transparent”) */
        background: #000 !important;
        backdrop-filter: blur(16px) !important;
    }

    /* Sur mobile, on garde le bloc à droite mais en le faisant wrap. */
    body.ps-public .bp2-nav-right {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
        margin-top: 2px;
    }

    body.ps-public .bp2-social-pill {
        height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    body.ps-public .ps-header-pill {
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }

    /* Résultats : organisation mobile (1 colonne) */
    body.ps-public .ps-result-card-head {
        padding: 16px 14px 14px;
    }

    body.ps-public .ps-result-card-title-block .ps-result-name {
        font-size: 17px;
        line-height: 1.2;
    }

    body.ps-public .ps-result-field-icon {
        width: 32px;
        height: 32px;
    }
}

/* Empty state inside public */
body.ps-public .ps-empty-state {
    border-radius: 16px;
    border: 1px dashed rgba(170, 120, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
    padding: 26px 18px;
}

/* Criteria cards */
body.ps-public .ps-criteria-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(170, 120, 255, 0.14);
}

/* Mobile : boutons wildcard/suppression alignés avec le label */
@media (max-width: 768px) {
    body.ps-public .ps-criteria-top-row {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px;
        margin-bottom: 10px;
    }

    body.ps-public .ps-criteria-top-row > div:first-child {
        flex: 1;
        min-width: 0;
    }

    body.ps-public .ps-criteria-label {
        margin-bottom: 0 !important;
        font-size: 16px;
    }

    body.ps-public .ps-criteria-actions {
        flex-shrink: 0;
        gap: 6px;
    }

    body.ps-public .ps-criteria-icon-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        flex-shrink: 0;
    }

    body.ps-public .ps-criteria-icon-btn svg {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0;
    }
}

/* Criteria list spacing similar to Breach2Bz */
body.ps-public .ps-search-actions-row {
    gap: 14px;
}

body.ps-public .ps-search-submit-wrapper .ps-search-submit-btn {
    min-width: 240px;
}

/* Results layout */
body.ps-public .ps-results-section .ps-results-header .ps-section-title {
    font-size: 20px;
}

body.ps-public .ps-result-card-compact {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(170, 120, 255, 0.18);
}

body.ps-public .ps-result-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 22px;
    padding: 14px 22px 18px;
    align-items: start; /* évite les décalages verticaux liés à la hauteur des lignes */
}

/* Sur grille (desktop), le label de section ne doit pas prendre une demi-colonne,
   sinon les champs auto-placés se retrouvent "décalés" visuellement. */
body.ps-public .ps-result-section-label {
    grid-column: 1 / -1;
}

body.ps-public .ps-result-field {
    border-bottom: none;
    padding: 6px 0;
    align-self: start;
    align-items: flex-start !important;
}

body.ps-public .ps-result-field-icon {
    margin-top: 2px;
}

body.ps-public .ps-result-field:last-child {
    padding-bottom: 6px;
}

/* Résultats : organisation mobile (1 colonne) */
@media (max-width: 520px) {
    body.ps-public .ps-result-fields {
        /* Sur mobile, repasser en empilement simple pour stabiliser l'alignement des icônes */
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr;
        gap: 6px 0;
        padding: 12px 14px 14px;
    }

    body.ps-public .ps-result-field {
        padding: 4px 0 !important;
    }

    body.ps-public .ps-result-field-icon {
        /* Laisse les règles de `static/style.css` gérer l'alignement */
    }
}

/* Copy button a bit more like Breach2Bz */
body.ps-public .ps-copy-btn {
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(170, 120, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

/* Icons used on public template (if not defined in style.css) */
.ps-icon-magnifier,
.ps-icon-plus,
.ps-icon-plus-large {
    display: inline-block;
    position: relative;
    vertical-align: middle;
}

.ps-icon-magnifier {
    width: 18px;
    height: 18px;
}
.ps-icon-magnifier::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.92);
}
.ps-icon-magnifier::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    background: rgba(255, 255, 255, 0.92);
    right: 0px;
    bottom: 2px;
    transform: rotate(45deg);
    border-radius: 999px;
}

.ps-icon-plus,
.ps-icon-plus-large {
    width: 18px;
    height: 18px;
}
.ps-icon-plus::before,
.ps-icon-plus-large::before,
.ps-icon-plus::after,
.ps-icon-plus-large::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}
.ps-icon-plus::before,
.ps-icon-plus-large::before {
    width: 14px;
    height: 2px;
}
.ps-icon-plus::after,
.ps-icon-plus-large::after {
    width: 2px;
    height: 14px;
}

.ps-icon-plus-large {
    width: 26px;
    height: 26px;
}
.ps-icon-plus-large::before {
    width: 20px;
    height: 3px;
}
.ps-icon-plus-large::after {
    width: 3px;
    height: 20px;
}

