/* ============================================
   HEARTS (js/newgames/hearts.js + hearts.html)
   All rules prefixed ht- ; retro Win95 look per style.css
   ============================================ */

.window-hearts {
    width: auto;
    min-width: unset;
}

/* 16px Start-menu / title-bar icon: white card with a red heart */
.icon-hearts-sm {
    width: 16px; height: 16px; position: relative; display: inline-block;
}
.icon-hearts-sm::before {
    content: '';
    position: absolute; top: 0; left: 2px;
    width: 11px; height: 14px;
    background: #fff;
    border: 1px solid #404040;
    border-radius: 1px;
}
.icon-hearts-sm::after {
    content: '\2665';
    position: absolute; top: 1px; left: 4px;
    font-size: 10px; line-height: 14px;
    color: #cc0000;
}

.ht-scorebar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 8px;
    font-size: 11px;
    background: var(--win-bg);
    border-bottom: 1px solid var(--win-dark);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

.ht-body {
    position: relative;
    background: #008000;
    width: 560px;
    height: 440px;
    overflow: hidden;
    flex-grow: 1;
}

.ht-status {
    padding: 3px 8px;
    font-size: 11px;
    background: var(--win-bg);
    border-top: 1px solid var(--win-light);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- cards (visuals modeled on .sol-card) ---------- */

.ht-card {
    width: 50px;
    height: 70px;
    background: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    position: relative;
    cursor: default;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.ht-red { color: #cc0000; }
.ht-black { color: #000; }

.ht-rank {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.ht-rank-b {
    top: auto;
    left: auto;
    bottom: 2px;
    right: 3px;
    transform: rotate(180deg);
}

.ht-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
}

/* ---------- your fanned hand ---------- */

.ht-hand {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.ht-hand .ht-card {
    margin-left: -26px;
    transition: transform 0.08s;
}

.ht-hand .ht-card:first-child { margin-left: 0; }

.ht-clickable { cursor: pointer; }

.ht-hand .ht-clickable:hover { transform: translateY(-6px); }

.ht-hand .ht-raised,
.ht-hand .ht-raised:hover {
    transform: translateY(-14px);
    outline: 2px solid #ffff00;
    outline-offset: -1px;
}

.ht-disabled {
    opacity: 0.55;
    background: #ddd;
}

/* ---------- trick area ---------- */

.ht-trick {
    position: absolute;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    width: 190px;
    height: 180px;
}

.ht-trick-slot {
    position: absolute;
    width: 50px;
    height: 70px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#ht-trick-n { top: 0; left: 70px; }
#ht-trick-s { bottom: 0; left: 70px; }
#ht-trick-w { left: 0; top: 55px; }
#ht-trick-e { right: 0; top: 55px; }

/* ---------- opponent seat plates ---------- */

.ht-seat {
    position: absolute;
    color: #fff;
    font-size: 11px;
    text-align: center;
    min-width: 90px;
}

.ht-seat-n { top: 6px; left: 50%; transform: translateX(-50%); }
.ht-seat-w { left: 8px; top: 130px; }
.ht-seat-e { right: 8px; top: 130px; }

.ht-seat-s {
    bottom: 88px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 4px;
}

.ht-name { font-weight: bold; }

.ht-seat.ht-active .ht-name,
.ht-seat-s.ht-active {
    background: #000080;
    color: #fff;
    padding: 0 4px;
}

.ht-minis {
    display: flex;
    justify-content: center;
    margin-top: 3px;
    height: 20px;
}

.ht-mini {
    width: 13px;
    height: 19px;
    border: 1px solid #111;
    border-radius: 2px;
    margin-left: -8px;
    background: repeating-linear-gradient(
        45deg,
        #1a3399 0px,
        #1a3399 3px,
        #2244aa 3px,
        #2244aa 6px
    );
}

.ht-mini:first-child { margin-left: 0; }

.ht-taken {
    margin-top: 2px;
    color: #ffff99;
}

/* ---------- pass confirm button ---------- */

.ht-pass-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 112px;
    z-index: 3;
}

.ht-pass-btn:disabled {
    color: var(--win-dark);
    text-shadow: 1px 1px 0 var(--win-light);
}

/* ---------- between-hands score modal ---------- */

.ht-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.ht-modal {
    background: var(--win-bg);
    border-top: 2px solid var(--win-light);
    border-left: 2px solid var(--win-light);
    border-right: 2px solid var(--win-darker);
    border-bottom: 2px solid var(--win-darker);
    box-shadow: 1px 1px 0 #000;
    padding: 10px 16px 12px;
    min-width: 300px;
    font-size: 11px;
    text-align: center;
}

.ht-modal-title {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 6px;
}

.ht-modal-table {
    margin: 6px auto 8px;
    border-collapse: collapse;
    font-size: 11px;
}

.ht-modal-table th,
.ht-modal-table td {
    border: 1px solid var(--win-dark);
    padding: 2px 10px;
}

.ht-modal-table .ht-total-row td {
    font-weight: bold;
    background: var(--win-light);
}

.ht-modal-msg { margin: 4px 0 10px; }
