.pokemon-popup {
    color: var(--text, #f0f0f0);
    font-family: "Rubik", Arial, Helvetica, sans-serif;
    font-size: 0.86rem;
}

.pokemon-popup-standalone-page {
    background: #121417;
    margin: 0;
}

.pokemon-popup-standalone {
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 0.75rem;
}

.alertpop-modal {
    z-index: 30000 !important;
}

.pokemon-popup-overlay {
    background: rgba(0, 0, 0, 0.72);
    bottom: 0;
    display: none;
    left: 0;
    overflow: auto;
    padding: 2rem 0.75rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 20010;
}

.pokemon-popup-overlay.open {
    display: block;
}

.pokemon-popup-shell {
    background: #171a1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
    margin: 0 auto;
    max-width: 760px;
    min-height: 120px;
    overflow: hidden;
    position: relative;
    width: min(100%, 760px);
}

.pokemon-popup-close {
    background: transparent;
    border: 0;
    color: var(--text, #f0f0f0);
    cursor: pointer;
    font-size: 1.6rem;
    height: 42px;
    line-height: 42px;
    opacity: 0.8;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 8px;
    width: 42px;
    z-index: 2;
}

.pokemon-popup-close:before {
    content: "\00d7";
}

.pokemon-popup-close:hover,
.pokemon-popup-close:focus {
    opacity: 1;
    outline: none;
}

.pokemon-popup-body {
    background: rgba(10, 12, 15, 0.88);
    max-height: 78vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1rem;
}

.pokemon-popup-loading,
.pokemon-popup-error {
    color: var(--text, #f0f0f0);
    padding: 2.25rem;
    text-align: center;
}

.pokemon-popup-message {
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.35);
    color: var(--text, #f0f0f0);
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: center;
}

.pokemon-popup-card a {
    color: var(--accent, #42a5f5);
    font-weight: 600;
    text-decoration: none;
}

.pokemon-popup-card a:hover,
.pokemon-popup-card a:focus {
    color: #84c8ff;
    text-decoration: none;
}

.pokemon-popup .fingradient,
.pokemon-popup span[class^="gradient"],
.pokemon-popup span[class*=" gradient"] {
    display: inline-block;
    line-height: 1.2;
    min-width: 0.75rem;
    padding: 0 0.18rem;
    vertical-align: middle;
    white-space: nowrap;
}

.pokemon-popup .fingradient span {
    background: transparent !important;
    display: inline-block;
}

.pokemon-popup-title,
.pokemon-popup-panel-title {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text, #f0f0f0);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    padding: 0.85rem 3rem 0.85rem 1rem;
    text-align: center;
}

.pokemon-popup-panel-title {
    font-size: 0.9rem;
    margin-bottom: 0;
    padding: 0.65rem 0.8rem;
}

.pokemon-popup-hero {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
    min-height: 132px;
}

.pokemon-popup-identity,
.pokemon-popup-art {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 1rem;
    text-align: center;
}

.pokemon-popup-identity {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.pokemon-popup-name {
    color: var(--text, #f0f0f0);
    font-size: 1rem;
    font-weight: 600;
}

.pokemon-popup-nickname {
    color: rgba(240, 240, 240, 0.68);
    font-size: 0.82rem;
    font-style: italic;
    margin-top: 0.15rem;
}

.pokemon-popup-icon {
    margin: 0.9rem 0 0.65rem;
    max-height: 32px;
    max-width: 40px;
}

.pokemon-popup-image {
    max-height: 100px;
    max-width: 150px;
}

.pokemon-popup-types {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    min-height: 20px;
}

.pokemon-popup-type-image {
    display: block;
    height: auto;
    max-height: 20px;
    max-width: none;
}

.pokemon-popup-type-fallback {
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.35);
    border-radius: 999px;
    color: var(--accent, #42a5f5);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.35rem 0.65rem;
    text-transform: uppercase;
}

.pokemon-popup-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 230px 1fr;
}

.pokemon-popup-table {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-collapse: collapse;
    width: 100%;
}

.pokemon-popup-table th,
.pokemon-popup-table td {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text, #f0f0f0);
    line-height: 1.25;
    padding: 0.62rem;
    text-align: center;
    vertical-align: middle;
}

.pokemon-popup-table th {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(240, 240, 240, 0.82);
    font-weight: 600;
}

.pokemon-popup-label {
    font-weight: 600;
}

.pokemon-popup-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.pokemon-popup-action {
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.35);
    border-radius: 999px;
    display: inline-flex;
    line-height: 1;
    padding: 0.42rem 0.65rem;
}

.pokemon-popup-links {
    margin-top: 1rem;
}

.pokemon-popup-feed {
    margin-top: 1rem;
}

.pokemon-popup-feed-title {
    color: var(--text, #f0f0f0);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
}

.alertpop-body .pokemon-popup-feed-title {
    margin-top: 0;
}

.pokemon-popup-feed-empty {
    color: var(--text, #f0f0f0);
    text-align: center;
}

.pokemon-popup-feed-control {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: center;
}

.pokemon-popup-equip-screen {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
}

.pokemon-popup-alt-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.pokemon-popup-feed-select,
.pokemon-popup-equip-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text, #f0f0f0);
    min-width: 220px;
    padding: 0.45rem 0.6rem;
}

.pokemon-popup-feed-select option,
.pokemon-popup-equip-select option {
    background: #171a1f;
    color: var(--text, #f0f0f0);
}

.pokemon-popup-links .pokemon-popup-table td {
    padding: 0.65rem;
}

@media (max-width: 680px) {
    .pokemon-popup-overlay {
        padding: 0.75rem;
    }

    .pokemon-popup-body {
        max-height: calc(100vh - 1.5rem);
        padding: 0.75rem;
    }

    .pokemon-popup-title {
        padding-right: 2.75rem;
    }

    .pokemon-popup-grid,
    .pokemon-popup-hero {
        grid-template-columns: 1fr;
    }

    .pokemon-popup-identity {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-right: 0;
    }
}
