/* Center the dropdown container */
.dropdown-highlight {
    width: 55%;
    margin: 0 auto;
    display: block;

    /* Styling */
    border: 2px solid #007BFF;
    border-radius: 6px;
    background-color: #f0f8ff;
    font-weight: bold;
    color: #003366;
    padding: 5px;
}

/* Make the dropdown react nicely on hover/focus */
.dropdown-highlight:focus,
.dropdown-highlight:hover {
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 91, 187, 0.5);
}

.dropdown-highlight.dropdown-left {
    margin: 0;
    width: 100%;
}

/* Fix overlapping option rows */
.dropdown-highlight .Select-option {
    padding: 6px 10px;
    min-height: 36px;
    line-height: 1.5;
    white-space: normal;        /* allow text to wrap rather than overflow */
    word-break: break-word;
    box-sizing: border-box;
    overflow: visible;
}

/* Ensure the menu container doesn't clip rows */
.dropdown-highlight .Select-menu {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 300px;
}

.dropdown-highlight .Select-menu-outer {
    overflow: visible;
    box-sizing: border-box;
}

/* Allow selected tags to wrap text */
.dropdown-highlight .Select-value {
    white-space: normal;
    word-break: break-word;
    height: auto;
    line-height: 1.4;
    padding: 2px 6px;
}

.dropdown-highlight .Select-value-label {
    white-space: normal;
    word-break: break-word;
}

/* Ensure the wrapper allows rows to grow */
.dropdown-highlight .Select-multi-value-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
    padding: 4px;
    height: auto;
    min-height: 36px;
}

/* Control height must also be auto to grow with tags */
.dropdown-highlight .Select-control {
    border: none !important;
    background-color: transparent !important;
    height: auto !important;
    min-height: 36px;
}

body.app-background {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.app-background::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("background.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: local;
    opacity: 0.7;
    z-index: -1;
}

/* ── Page slide transitions ───────────────────────────── */

/* Entering from the right (going forward: / → /compare) */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Entering from the left (going back: /compare → /) */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-slide-in-right {
    animation: slideInRight 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.page-slide-in-left {
    animation: slideInLeft 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.info-circle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #533383;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 6px;
}

.info-circle-sm {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #533383;
    color: white;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

.popover {
    border-radius: 12px !important;
    border: 1px solid #533383 !important;
    box-shadow: 0 8px 24px rgba(83, 51, 131, 0.3) !important;
    font-family: inherit;
}

.popover-header {
    background-color: #533383 !important;
    color: white !important;
    border-radius: 11px 11px 0 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 14px !important;
    border-bottom: none !important;
}

.popover-body {
    background-color: #1e1e2e !important;  /* match your app's dark bg */
    color: #d0d0e0 !important;
    font-size: 12.5px !important;
    line-height: 1.6 !important;
    border-radius: 0 0 11px 11px !important;
    padding: 12px 14px !important;
}

/* ── Shell & background ───────────────────────────────── */
.shell {
    min-height: 100vh;
    position: relative;
}

.app-background--fixed {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.page-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 64px; /* height of nav */
}

/* ── Arrow navigation ─────────────────────────────────── */
.nav-arrow {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 999;
}

.nav-arrow--right {
    right: 20px;
    flex-direction: row;
}

.nav-arrow--left {
    left: 20px;
    flex-direction: row;
}

.nav-arrow-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #533383;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-arrow-circle i {
    color: white;
    font-size: 16px;
    line-height: 1;
}

.nav-arrow-label {
    font-size: 18px;
    font-weight: 700;
    color: #262626;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* ── Responsive behaviour ─────────────────────────────── */

/* Large — label wraps below the circle */
@media (max-width: 1900px) {
    .nav-arrow {
        flex-direction: column !important;
        gap: 6px;
        align-items: center;
    }

    .nav-arrow-label {
        font-size: 12px;
        text-align: center;
        white-space: normal;
        max-width: 55px;        /* matches circle width — forces wrapping */
        line-height: 1.2;
    }
}

/* Small — label disappears entirely */
@media (max-width: 768px) {
    .nav-arrow-label {
        display: none;
    }

    .nav-arrow {
        gap: 0;
    }
}

/* Hover effects */
.nav-arrow:hover .nav-arrow-circle {
    background-color: #6a45a8;
    transform: scale(1.1);
}

.nav-arrow:hover .nav-arrow-label {
    color: #533383;
}

/* Slide the icon on hover */
.nav-arrow--right:hover .nav-arrow-circle i {
    animation: nudge-right 0.3s ease forwards;
}
.nav-arrow--left:hover .nav-arrow-circle i {
    animation: nudge-left 0.3s ease forwards;
}

@keyframes nudge-right {
    0%   { transform: translateX(0); }
    50%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}
@keyframes nudge-left {
    0%   { transform: translateX(0); }
    50%  { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

/* Make sure the card has relative positioning for absolute children */
.card-body {
    position: relative;
}

/* ── Capital selector panel ───────────────────────────── */
.selector-label {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.cap-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.cap-pill {
    padding: 5px 13px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: white;
    color: #555;
    transition: all 0.15s;
}
.cap-pill:hover { background: #f5f5f5; color: #222; }
.cap-pill--active { background: #533383 !important; color: white !important; border-color: #533383 !important; }

.var-divider { border-color: #eee; margin: 12px 0; }

.drill-label {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 8px;
}

.var-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 16px;
}

.var-btn {
    padding: 7px 8px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    transition: all 0.15s;
    line-height: 1.3;
}
.var-btn:hover { border-color: #533383; color: #222; }
.var-btn--active { background: #f0ebfa !important; border-color: #533383 !important; color: #3C3489 !important; font-weight: 500; }

.info-strip {
    font-size: 11px;
    color: gray;
    font-style: italic;
    border-left: 2px solid #533383;
    padding-left: 8px;
    line-height: 1.5;
    margin-top: 8px;
}

.rank-toggle {
    font-size: 12px;
    color: #003366;
    font-style: italic;
    opacity: 0.85;
}

.rank-toggle .form-check-input:checked {
    background-color: #007BFF;
    border-color: #007BFF;
}

.rank-toggle .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
}

.rank-toggle .form-check-label {
    font-size: 14px;
    padding-top: 2px;
    cursor: pointer;
    padding-left: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tab-fade {
    animation: fadeIn 2s ease-in-out;
}