/* Tooltip */
.custom-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 100;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    /* Default to auto width */
    width: auto;
    white-space: nowrap;
    /* Center text by default for simple tooltips */
    text-align: center;
}

.custom-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.custom-tooltip.removing {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

.custom-tooltip:after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--secondary-color);
    pointer-events: none;
}

/* Season Dropdown Styles - Reuse region styling */

/* Special class for player name tooltips */
.custom-tooltip.player-tooltip {
    /* No specific width constraints */
    width: auto;
    white-space: normal; /* Allow wrapping inside the player tooltip container */
    text-align: left; /* Left-align text for this specific tooltip type */
}

/* Special class for the OP.GG link */
.custom-tooltip .opgg-link {
    display: block;
    width: 60px;
}

.custom-tooltip .opgg-icon {
    width: 100%;
    height: auto;
    margin-top: 3px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    text-align: center;
    color: var(--text-color);
    width: 90%;
    max-width: 500px;
    max-height: 80vh; /* Keep the max height constraint */
    position: relative;
    overflow-y: auto;   /* Add this line to enable vertical scrolling */
    /* Add custom scrollbar styling (optional but recommended) */
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-color) var(--semi-transparent-bg);
}

#checkout-container {
    width: 100%;
    height: 1000px; /* Adjust if needed */
}

/* Support Comment Box */
.support-comment {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 80%;
    background: rgba(30, 30, 30, 0.95);
    border: 2px solid var(--primary-color);
    border-bottom: none;
    border-radius: 12px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    transition: transform 0.5s ease, max-height 0.5s ease;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
}

.support-comment.visible {
    transform: translateX(-50%) translateY(0);
    max-height: 180px;
}

.support-comment-content {
    padding: 5px 20px;
    text-align: center;
    position: relative;
}

.close-comment {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(30, 30, 30, 0.95);
    border: none;
    color: var(--primary-color);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    width: 26px;
    height: 26px;
    line-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-comment:hover {
    background: var(--highlight-color);
    color: #ffffff;
    box-shadow: 0 0 5px var(--highlight-color);
}

.support-link {
    display: inline-flex;
    align-items: center;
    margin: 0 5px;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.support-link:hover {
    transform: scale(1.1);
}

.support-icon {
    width: 90px;
    height: 90px;
    margin: -60px 0;
    /* filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); */
    vertical-align: middle;
}

.support-comment p.with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.support-comment p {
    margin: 6px 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

.support-comment .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    width: calc(100% - 110px); /* Adjust width to match input (accounting for search button) */
    max-height: 300px;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--highlight-color);
    border-radius: 6px;
    box-shadow: 0 5px 15px var(--shadow-color);
    z-index: 50;
    overflow-y: auto;
    display: none;
    left: 0; /* Align with left edge of input */
    top: calc(100% + 5px); /* Position below input with 5px gap */
    pointer-events: auto; /* This ensures the dropdown captures all mouse events */
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--highlight-color);
}

.rank-hint {
    color: var(--primary-color);
    font-size: 0.9em;
    opacity: 0.8;
    margin-left: 5px;
}

/* Add this to styles.css to make the hover-equivalent match the hover effect */
.autocomplete-item.hover-equivalent {
    background: var(--highlight-color);
}

/* Help Dropdown */
.help-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--highlight-color);
    border-radius: 6px;
    box-shadow: 0 5px 15px var(--shadow-color);
    min-width: 600px;
    max-width: 600px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 52;
}

.help-dropdown.show {
    display: block;
}

.help-content {
    padding: 15px 20px;
    color: var(--text-color);
}

.help-content h3 {
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.help-content h3:first-child {
    margin-top: 0;
}

.help-content p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.help-content p:last-child {
    margin-bottom: 0;
}

/* Region Dropdown */
.season-dropdown,
.region-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--highlight-color);
    border-radius: 6px;
    box-shadow: 0 5px 15px var(--shadow-color);
    min-width: 100%;
    display: none;
    z-index: 51;
}

.season-dropdown.show,
.region-dropdown.show {
    display: block;
}

.season-option,
.region-option {
    padding: 10px 15px;
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.season-option:hover,
.region-option:hover {
    background: var(--highlight-color);
}

/* Disabled region option styling */
.region-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    color: rgba(240, 240, 240, 0.5);
}

.region-option.disabled:hover {
    background: none !important;
}

/* Coming soon text styling */
.coming-soon {
    font-style: italic;
    color: #D7A84E; /* Use primary color (yellow/gold) */
    font-weight: 400;
    font-size: 0.9em;
}