/* Minimal, low‑risk overrides for ACHL site.
 *
 * Goal: keep the STHS visual style, but slightly improve usability on
 * smaller screens and long pages (scrolling, stacking).
 *
 * If anything feels wrong, you can simply delete this file from the server.
 */

/* 1) Make large tables horizontally scrollable on small screens */
.STHSPHPStanding_Table,
.STHSPHPPlayersStat_Table,
.STHSPHPGoaliesStat_Table,
.STHSPHPTeamsStat_Table,
.STHSIndex_HeadlineTable {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    /* Mobile: gentle typography bump for readability */
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    table {
        font-size: 0.95em;
    }

    /* Add a small hint above wide tables on small screens */
    .STHSPHPStanding_Table::before,
    .STHSPHPPlayersStat_Table::before,
    .STHSPHPGoaliesStat_Table::before,
    .STHSPHPTeamsStat_Table::before,
    .STHSIndex_HeadlineTable::before {
        content: "Scroll sideways to see the full table \2192";
        display: block;
        padding: 2px 4px;
        font-size: 0.8em;
        color: #666;
    }
}

/* 2) Keep index page columns but stack them on narrow viewports */
.STHSIndex_Score,
.STHSIndex_NewsTD,
.STHSIndex_Top5 {
    vertical-align: top;
}

@media (max-width: 991px) {
    .STHSIndex_Main {
        width: 100%;
    }

    .STHSIndex_Score,
    .STHSIndex_NewsTD,
    .STHSIndex_Top5 {
        display: block;
        width: 100%;
    }
}

/* 3) Limit news height so it doesn’t grow endlessly */
.STHSIndex_NewsDiv {
    max-height: 600px;
    overflow-y: auto;
}

/* 4) Home page layout polish (visual only, no structural change) */
.STHSIndex_Main {
    margin: 10px auto;
    border-collapse: collapse;
}

.STHSIndex_Score,
.STHSIndex_NewsTD,
.STHSIndex_Top5 {
    padding: 8px;
}

/* Give inner blocks a subtle card look */
.STHSTableFullW,
.STHSIndex_GamesResult,
.STHSIndex_HeadlineTable,
.STHSIndex_Top5Table {
    border-radius: 4px;
    border: 1px solid #d4d4d4;
}

.STHSIndex_LastestResult,
.STHSIndex_TheNews,
.STHSIndex_Headline {
    font-weight: bold;
    padding: 4px 6px;
    border-bottom: 1px solid #d4d4d4;
    background: #f5f5f5;
}

/* Try to balance column widths on desktop */
@media (min-width: 992px) {
    .STHSIndex_NewsTD {
        width: 50%;
        padding-right: 20px;
        border-right: 1px solid #d4d4d4;
    }

    .STHSIndex_Top5 {
        width: 50%;
        padding-left: 20px;
    }
}

/* Hero ticker */
.STHSIndex_Hero {
    width: 95%;
    margin: 10px auto;
}

#ScoreTicker {
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    padding: 4px 8px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#ScoreTickerInner {
    display: inline-block;
    white-space: nowrap;
    will-change: transform;
}

.ScoreTickerItem {
    display: inline-block;
    padding: 2px 18px;
    white-space: nowrap;
    border-right: 1px solid #e0e0e0;
}

.ScoreTickerItem:last-child {
    border-right: none;
}

/* Dragging state for ticker */
#ScoreTicker.dragging {
    cursor: grabbing;
}

/* Mobile team jump bar under header */
.STHSMobileTeamJump {
    display: none;
    padding: 6px 10px;
    background: #f5f5f5;
    border-bottom: 1px solid #d4d4d4;
    font-size: 0.9em;
}
.STHSMobileTeamJump label {
    margin-right: 6px;
}
.STHSMobileTeamJump select {
    max-width: 55%;
    font-size: 0.9em;
}
.STHSMobileTeamJump button {
    margin-left: 6px;
    font-size: 0.9em;
    padding: 2px 8px;
}

@media (max-width: 991px) {
    .STHSMobileTeamJump {
        display: block;
    }
}

/* Global quick search (Menu.php) - brand aligned */
.STHSGlobalQuickSearch{
    width: 95%;
    max-width: 1400px;
    margin: 0 auto 10px auto;
    padding: 10px 12px;
    background: #336699;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    position: relative;
}
.STHSGlobalQuickSearch label{
    color: #ffffff;
    font-weight: 700;
    margin-right: 10px;
}
#STHSQuickSearchInput{
    width: min(520px, 100%);
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    background: rgba(255,255,255,0.95);
    color: #111;
}
#STHSQuickSearchInput::placeholder{
    color: rgba(0,0,0,0.55);
}
#STHSQuickSearchInput:focus{
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102,153,204,0.35);
}
.STHSQuickSearchResults{
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    z-index: 999;
    max-height: 340px;
    overflow: auto;
}
.STHSQuickSearchResults a{
    display: block;
    padding: 8px 8px;
    border-radius: 8px;
    color: #0b2a44;
    text-decoration: none;
}
.STHSQuickSearchResults a:hover{
    background: rgba(102,153,204,0.18);
    text-decoration: none;
}

