/* Prediction Tournament Banner */

/* Default font for all prediction content */
.article-group.current-article,
.prediction_container,
.prediction-menu-item,
.prediction_date,
.prediction_date_game_list,
.prediction_game_row,
.prediction_info_message,
.prediction_question_list {
    font-family: 'Roboto', sans-serif;
}

.prediction-banner {
    color: #ffffff;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    margin-top: 3px;
    border-radius: 5px 5px 0px 0px; 
    height: 80px;
}

.prediction-banner img {
    height: 26px;
    margin-right: 8px;
}

/* Mobile */
@media screen and (max-width: 767px) {
    .prediction-banner {
        height: 60px;
        margin: 0;
        padding: 0;
        font-size: 18px;
    }

    .prediction-banner img {
        height: 14px;
        margin-right: 4px;
    }
}

/* Prediction Menu */
.prediction-menu {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.prediction-menu-item {
    flex: 0 0 auto;
    padding: 12px 10px;
    text-align: center;
    white-space: nowrap;
}

.prediction-menu-item a {
    color: white;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.prediction-menu-item.active a,
.prediction-menu-item a:hover {
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
    font-weight: 700;
}

@media screen and (min-width: 768px) {
    .prediction-menu {
        justify-content: center;
    }
    
    .prediction-menu-item a {
        font-size: 16px;
    }

    .prediction-menu-item {
    padding: 12px 20px;
}
}

/* Prediction Container */
.prediction_container {
    padding: 20px;
    min-height: 500px;
    position: relative;
    z-index: 1;
    border-radius: 0 0 5px 5px;
}

/* Info Message */
.prediction_info_message {
    color: #ffffff;
    padding: 15px 0px;
    font-size: 16px;
}

/* Questions Section */
.prediction_question_list {
    padding: 10px 0;
}

.prediction_game_row.question {
    background: #1a7e7d;
    margin: 5px 0;
    padding: 6px;
    border-radius: 8px;
    display: block;
    border: none;
}

.prediction_question {
    width: 100%;
    color: #ffffff;
    font-size: 16px !important;
    margin: 0 0 10px 0 !important;
}

.prediction_question_dropdown {
    width: 100%;
}

.prediction_question_select {
    width: 100%;
    padding: 10px;
    background: #146665;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    font-size: 14px;
}

/* Ordering Question */
.prediction_game_row.question.ordering {
    padding: 12px;
}

.prediction_ordering_container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.prediction_ordering_item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #146665;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}

.prediction_ordering_item:active {
    cursor: grabbing;
}

.prediction_ordering_item:hover {
    background: #1a8a89;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.prediction_ordering_position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.prediction_ordering_code {
    flex: 1;
    font-family: 'Roboto Condensed', sans-serif;
    letter-spacing: 0.5px;
}

.prediction_ordering_handle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    flex-shrink: 0;
}

/* SortableJS drag states */
.prediction_ordering_ghost {
    opacity: 0.4;
    background: #1a8a89;
}

.prediction_ordering_chosen {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.prediction_ordering_drag {
    opacity: 0.9;
}

/* Ordering scoring indicators */
.prediction_ordering_item.ordering_correct {
    background: #8bc34a;
    border-color: #7cb342;
}

.prediction_ordering_item.ordering_incorrect {
    background: #e53935;
    border-color: #d32f2f;
}

.prediction_ordering_save_btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #ffffff;
    color: #146665;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.prediction_ordering_save_btn:hover {
    background: #e8f4f3;
}

.prediction_ordering_save_btn:active {
    transform: scale(0.98);
}

/* Round Header */
.prediction_date {
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    font-size: 16px;
}

/* Game List Container */
.prediction_date_game_list {
    background: #ffffff;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin-bottom: 20px;
}

/* Individual Game Row */
.prediction_game_row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 15px;
    gap: 8px;
    border-bottom: 1px solid #e9f2f2;
}

.prediction_game_row:last-child {
    border-bottom: none;
}

.prediction_game_time {
    flex: 0 0 auto;
    font-size: 13px;
    color: #666;
    min-width: 70px;
}

.prediction_game_time_div {
    white-space: nowrap;
}

.prediction_game_team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    min-width: 120px;
    max-width: 180px;
    flex: 1 1 auto;
}

.prediction_game_team_home {
    justify-content: flex-end;
}

.prediction_game_team_away {
    justify-content: flex-start;
}

.prediction_game_team_logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.prediction_game_separator {
    flex: 0 0 auto;
    color: #999;
    font-size: 14px;
    padding: 0 4px;
}

.prediction_game_button {
    flex: 0 0 auto;
}

.prediction_game_button:first-of-type {
    margin-left: auto;
}

.prediction_game_button_div {
    width: 45px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f4f3;
    color: #146665;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.prediction_game_button_div:hover {
    background: #d0e9e8;
}

.prediction_game_button_div.active {
    background-color: #146665;
    color: #ffffff;
}

.prediction_game_button_div.correct {
    background: #8bc34a;
    color: #ffffff;
    border: none;
}

.prediction_game_button_div.incorrect {
    background: #e53935;
    color: #ffffff;
    border: none;
}

.prediction_game_score {
    flex: 0 0 auto;
    min-width: 50px;
    text-align: center;
}

.prediction_game_score_div {
    font-weight: 700;
    color: #146665;
}

/* Mobile Optimizations */
@media screen and (max-width: 767px) {
    .prediction_container {
        padding: 0;
    }
    
    .prediction_question {
        font-size: 14px !important;
    }
    
    .prediction_game_row {
        padding: 10px 8px;
        gap: 4px;
    }
    
    .prediction_game_time {
        font-size: 11px;
        min-width: 60px;
    }
    
    .prediction_game_team {
        font-size: 12px;
        gap: 4px;
        min-width: 60px;
        max-width: 90px;
    }
    
    .prediction_game_team_logo {
        width: 20px;
        height: 20px;
    }
    
    .prediction_game_separator {
        font-size: 12px;
        padding: 0 2px;
    }
    
    .prediction_game_button_div {
        width: 38px;
        height: 25px;
        font-size: 14px;
    }
    
    .prediction_game_score {
        min-width: 40px;
        font-size: 12px;
    }

    .prediction_ordering_item {
        padding: 8px 10px;
        font-size: 14px;
        gap: 8px;
    }

    .prediction_ordering_position {
        min-width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .prediction_ordering_save_btn {
        padding: 10px;
        font-size: 14px;
    }
}

/* Desktop Optimizations */
@media screen and (min-width: 768px) {
    .prediction_container {
        max-width: 900px;
        margin: 0 auto;
        padding: 30px;
    }
    
    .prediction_date_game_list {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .prediction_game_row {
        padding: 12px 20px;
        gap: 10px;
    }
    
    .prediction_game_time {
        min-width: 85px;
    }
    
    .prediction_game_team {
        gap: 8px;
        min-width: 140px;
        max-width: 200px;
    }
    
    .prediction_game_button_div {
        width: 50px;
    }
}

/* Select2 Dropdown Styling */
.select2-container--default .select2-selection--single {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    height: 40px;
}

/* When dropdown is open, round only top corners of input */
.select2-container--default.select2-container--open .select2-selection--single {
    border-radius: 8px 8px 0 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff;
    line-height: 38px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.select2-dropdown {
    background-color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    border-top: none;
}

.select2-container--default .select2-results__option {
    color: #333333;
    background-color: #ffffff;
    border-bottom: 1px solid #e9f2f2;
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #146665;
    color: #ffffff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #146665;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin: 8px;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #146665;
}

/* Question result indicators */
.prediction_question_correct {
    background-color: #8bc34a !important;
}

.prediction_question_incorrect {
    background-color: #e53935 !important;
}

/* Ranking Table Styles */
.prediction_heading {
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 0 0;
}

.prediction_table {
    background: #ffffff;
    border-radius: 0 0 5px 5px;
    margin-bottom: 20px;
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.prediction_table_header {
    background: #f5f5f5;
}

.prediction_table_header_cell {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    border-bottom: 2px solid #e9f2f2;
}

.prediction_table_body {
    background: #ffffff;
}

.prediction_table_row {
    border-bottom: 1px solid #e9f2f2;
}

.prediction_table_row:last-child {
    border-bottom: none;
}

.prediction_table_row:last-child .prediction_table_cell:first-child {
    border-bottom-left-radius: 5px;
}

.prediction_table_row:last-child .prediction_table_cell:last-child {
    border-bottom-right-radius: 5px;
}

.prediction_table_row_current {
    background-color: #e8f4f3 !important;
}

.prediction_table_row_current .prediction_table_cell {
    font-weight: 600;
}

.prediction_table_cell {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
}

.prediction_table_cell img {
    vertical-align: middle;
    margin-right: 6px;
}

@media screen and (max-width: 767px) {
    .prediction_table_header_cell,
    .prediction_table_cell {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .prediction_heading {
        font-size: 14px;
        padding: 10px 8px;
    }
}

/* OhSnap Notifications */
#ohsnap {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
}

#ohsnap .alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease-out;
    text-align: center;
    background-color: white;
}

#ohsnap .alert.green {
    background-color: #4CAF50;
    color: white;
}

#ohsnap .alert.red {
    background-color: #f44336;
    color: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    #ohsnap {
        top: 60px;
        min-width: 250px;
        max-width: 90%;
    }
    
    #ohsnap .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Friend League Forms */
.prediction_heading {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 12px 10px;
    margin-top: 30px;
    border-radius: 5px 5px 0 0;
    letter-spacing: 0.5px;
}

.prediction_heading:first-of-type {
    margin-top: 0;
}

.prediction_form_input_row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.prediction_form_label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    min-width: 100px;
}

.prediction_form_input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.prediction_form_input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
}

.prediction_form_button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #ffffff;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prediction_form_button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.prediction_form_button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .prediction_form_input_row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .prediction_form_label {
        min-width: auto;
    }
    
    .prediction_form_input {
        min-width: auto;
        width: 100%;
    }
    
    .prediction_form_button {
        width: 100%;
    }
}
