/* ===================================
   CONSOLIDATED CARDS-AND-BUTTONS.CSS
   Card Styling, Button Components, and Interactive Elements
   =================================== */

/* ===================================
   PLAYING CARDS
   =================================== */

.playingcard {
    display: inline-block;
    width: 116px;
    height: 160px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.playingcard:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3) !important;
}

/* Card overlays */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 116px;
    height: 160px;
    background-color: rgba(128, 128, 128, 0.5);
}

/* Player cards styling */
.player {
    display: inline;
    width: 117px;
    height: 13px;
    z-index: 14;
}

/* Cards container for mobile */
.cards {
    display: flex;
    padding: 25px 0px;
    list-style: none;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
}

.card {
    display: flex;
    flex-direction: column;
}

.card:not(:last-child) {
    margin-right: 10px;
}

.card:hover {
    color: var(--white);
    background: var(--red);
}

.card .card-title {
    font-size: 20px;
}

.card .card-content {
    margin: 20px 0;
    max-width: 85%;
}

.card .card-link-wrapper {
    margin-top: auto;
}

.card .card-link {
    display: inline-block;
    text-decoration: none;
    color: white;
    background: var(--red);
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.card:hover .card-link {
    background: var(--darkred);
}

.cards::-webkit-scrollbar {
    height: 12px;
}

.cards::-webkit-scrollbar-thumb,
.cards::-webkit-scrollbar-track {
    border-radius: 92px;
}

.cards::-webkit-scrollbar-thumb {
    background: var(--darkred);
}

.cards::-webkit-scrollbar-track {
    background: var(--thumb);
}

/* ===================================
   MENU BUTTONS
   =================================== */

.menu-button {
    display: inline-block;
    width: 55px;
    height: 55px;
    font-size: 16px;
    cursor: pointer;
    margin: 0;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.menu-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    display: block;
}

.menu-button:hover img {
    transform: translateY(-1px);
}

.menu-button:active img {
    transform: translateY(1px);
}

/* Specific button styling */
.refresh-button {
    display: inline;
    float: left;
    width: 10%;
}

.card-skins-button {
    display: inline;
    float: left;
    width: 10%;
}

.info-button {
    display: inline;
    float: left;
    width: 10%;
}

/* ===================================
   BUTTON-27 COMPONENT
   =================================== */

.button-27 {
    appearance: none;
    background-color: #000000;
    border: 2px solid #1A1A1A;
    border-radius: 15px;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-block;
    font-family: 'Varela Round', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    margin: 8px 0;
    min-height: 45px;
    min-width: 0;
    outline: none;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    will-change: transform;
}

.button-27:disabled {
    pointer-events: none;
}

.button-27:hover {
    box-shadow: rgba(0, 0, 0, 0.25) 0 8px 15px;
    transform: translateY(-2px);
}

.button-27:active {
    box-shadow: none;
    transform: translateY(0);
}

.button-27:hover {
    transform: translateY(-1px) !important;
}

.button-27:active {
    transform: translateY(2px) !important;
}

/* Logout button special styling */
.side-menu .button-27.logout-button,
.side-menu .logout-button {
    background-color: #fc5658 !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    min-height: 32px !important;
    max-width: 120px !important;
    min-width: 80px !important;
    margin: 20px auto 60px auto !important;
}

.side-menu .button-27.logout-button,
.side-menu a.button-27.logout-button,
a.logout-button.button-27 {
    background-color: #fc5658 !important;
    background-image: none !important;
    border-color: #fc5658 !important;
    color: white !important;
}

/* Ensure buttons get their proper backgrounds */
.side-menu .button-27 {
    background-color: #000000 !important;
}

.side-menu .button-27.logout-button {
    background-color: #fc5658 !important;
}

/* Style Exit Game link like logout button */
.side-menu a[onclick*="confirmExitGame"] {
    background-color: #fc5658 !important;
    background-image: none !important;
    border: 2px solid #fc5658 !important;
    border-radius: 15px !important;
    color: white !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    min-height: 32px !important;
    max-width: 120px !important;
    min-width: 80px !important;
    margin: 20px auto 60px auto !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 300ms cubic-bezier(.23, 1, 0.32, 1) !important;
}

/* ===================================
   INTERACTIVE STATES
   =================================== */

/* Disable interactions state */
.interactions-disabled {
    pointer-events: none;
    user-select: none;
}

.interactions-disabled * {
    pointer-events: none !important;
    cursor: not-allowed !important;
}

/* Hide game overlay */
.hide-game {
    background-color: grey;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    z-index: 998;
    opacity: 0.7;
}

.showmenu {
    display: block;
}

/* ===================================
   RESPONSIVE BUTTON ADJUSTMENTS
   =================================== */

/* Small phones (up to 480px) */
@media screen and (max-width: 480px) {
    .menu-button {
        width: 45px;
        height: 45px;
        margin: 0;
    }

    .menu-section {
        margin-left: auto;
        margin-right: auto;    
    }

    .menu-button {
        display: inline;
        float: left;
        width: 100%;
        font-size: 16px;
        cursor: pointer;
    }

    .refresh-button {
        display: inline;
        float: left;
        width: 10%;
    }

    .card-skins-button {
        display: inline;
        float: left;
        width: 10%;
    }

    .info-button {
        display: inline;
        float: left;
        width: 10%;
    }
}

/* Medium phones (481px - 667px) */
@media screen and (min-width: 481px) and (max-width: 667px) {
    .menu-button {
        width: 52px;
        height: 52px;
        margin: 0;
    }
}

/* Large phones (668px - 768px) */
@media screen and (min-width: 668px) and (max-width: 768px) {
    .menu-button {
        width: 60px;
        height: 60px;
        margin: 0;
    }
}

/* ===================================
   LEGACY CARD POSITIONS (from styles.css)
   =================================== */

#menu-outer {
    height: 84px;
    background: url(images/bar-bg.jpg) repeat-x;
    margin-bottom: 10px;
}

.table {
    display: table;
    margin: 0 auto;
}

ul#horizontal-list {
    min-width: 696px;
    list-style: none;
    padding-top: 20px;	
}

ul#horizontal-list li {
    display: inline;
}

#help {
    display: inline;
    float: right;
    width: 64px;
    height: 66px;
    z-index: 2;
}

#cardsmenu {
    display: inline;
    float: right;
    width: 71px;
    height: 67px;
    z-index: 3;
}

#updatetext {
    text-align: center;
    width: 192px;
    height: 53px;
    z-index: 4;
}

#refresh {
    display: inline;
    float: left;
    width: 61px;
    height: 60px;
    z-index: 5;
}

#menu {
    display: inline;
    float: left;
    width: 58px;
    height: 63px;
    z-index: 6;
}

#bottomcard {
    left: 502px; 
    top: 131px; 
    position: absolute; 
    width: 339px;
    height: 343px;
    z-index: 7;
}

#middlecard {
    left: 502px; 
    top: 130px; 
    position: absolute; 
    width: 339px;
    height: 344px;
    z-index: 8;
}

#topcard {
    display: inline;
    width: 195px;
    height: 312px;
    z-index: 9;
}

#cutter {
    width: 29px;
    height: 27px;
    z-index: 10;
}

#Currentplayer {
    width: 125px;
    height: 12px;
    z-index: 15;
}

#PP {
    width: 58px;
    height: 53px;
    z-index: 16;
}