﻿/* ============================================================
   OWNER PANEL — TOKENISED
============================================================ */

/* ===========================
   Owner Panel
=========================== */
/*#ownerControls,
#resultsControls {
    display: none !important;
}*/


.owner-panel {
    display: grid;
    gap: var(--space-6);
    padding: var(--space-5);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    max-width: 650px;
    margin: 0 auto;
    color: var(--color-text-primary);
    box-shadow: var(--shadow-soft);
}

    .owner-panel h3 {
        margin-bottom: 0;
        font-size: var(--font-size-lg);
        font-weight: 700;
    }
   


/* ===========================
   Owner Group
=========================== */
.owner-group {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-bg-main);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
}

    .owner-group h4 {
        margin: 0;
        font-size: var(--font-size-md);
        font-weight: 600;
    }

    .owner-group input,
    .owner-group button {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-md);
    }


/* ===========================
   Deadline Display
=========================== */
#weekDeadlineDisplay {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}


/* ===========================
   Owner Box
=========================== */
.ownerBox {
    border: 1px solid var(--color-border-dark);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--color-bg-surface);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-soft);
}

    .ownerBox h4 {
        margin-top: 0;
        font-size: var(--font-size-md);
        font-weight: 600;
    }


/* ===========================
   Owner Inputs
=========================== */
.ownerInput,
input[type="datetime-local"].ownerInput {
    width: 100%;
    margin: var(--space-2) 0 var(--space-4);
    padding: var(--space-3);
    font-size: var(--font-size-md);
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

@media (max-width: 430px) {
    .ownerInput,
    input[type="datetime-local"].ownerInput {
        font-size: var(--font-size-sm);
        padding: var(--space-3);
        width: calc(100% - var(--space-4));
    }

    .ownerBox {
        padding: var(--space-3);
    }
}


/* ===========================
   Results Panel
=========================== */
#resultsList {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.resultRow {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    background: var(--color-bg-surface);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-dark);
    box-shadow: var(--shadow-soft);
}


/* ===========================
   Team Labels
=========================== */
.teamLabel {
    padding: 0 var(--space-2); /* NEW: horizontal breathing room */
    flex: 1 1 0;
    max-width: 40%;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .teamLabel.home {
        text-align: right;
    }

    .teamLabel.away {
        text-align: left;
    }

    .teamLabel:hover {
        overflow: visible;
        white-space: normal;
        background: var(--color-bg-main);
        padding: var(--space-1);
        border-radius: var(--radius-sm);
        position: relative;
        z-index: 1;
    }


/* ===========================
   Score Picker
=========================== */
.scorePicker {
    width: 38px;
    min-width: 38px;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-dark);
}

.scoreDisplay {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: var(--space-1) 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scoreBtn {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: var(--font-size-md);
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

    .scoreBtn:hover {
        transform: scale(1.15);
    }

@keyframes scorePulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

.scoreDisplay.pulse {
    animation: scorePulse 0.18s ease-out;
}

.vsText {
    font-weight: 700;
    color: var(--color-text-muted);
    flex: 0 0 auto;
}

.resultRow .teamLabel:hover,
.fixture-row .teamLabel:hover {
    overflow: hidden;
    white-space: nowrap;
    background: none;
    padding: 0;
    position: static;
}


/* ===========================
   Edit / Save Buttons
=========================== */


.fixture-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: var(--space-3);
    gap: var(--space-2);
}


/* ===========================
   Mobile Layout
=========================== */
@media (max-width: 480px) {
    .resultRow {
        flex-wrap: wrap;
        gap: var(--space-2);
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--color-border-dark);
    }

    .teamLabel.home {
        flex: 1 1 0;
        min-width: 0;
        text-align: right;
    }

    .scorePicker.homeScore,
    .scorePicker.awayScore {
        flex: 0 0 auto;
        width: 34px;
        min-width: 34px;
        padding: var(--space-1);
        text-align: center;
    }

    .teamLabel.away {
        flex: 1 1 0;
        min-width: 0;
        text-align: left;
    }

    .postponedToggle {
        flex: 1 1 100%;
        display: flex;
        justify-content: center;
        margin-top: var(--space-1);
    }

    .fixture-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
        gap: var(--space-2);
        margin-top: var(--space-1);
    }
}


/* ===========================
   Postponed Toggle
=========================== */
.postponedToggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-3);
}

.scorePicker.disabled {
    opacity: 0.5;
    pointer-events: none;
}


/* Modern toggle switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    inset: 0;
    background-color: var(--color-text-secondary);
    border-radius: 24px;
    transition: var(--transition-fast);
}

    .slider:before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: var(--color-text-primary);
        border-radius: 50%;
        transition: var(--transition-fast);
    }

input:checked + .slider {
    background-color: var(--color-success);
}

    input:checked + .slider:before {
        transform: translateX(20px);
    }


/* ===========================
   Deadline Text
=========================== */
.deadlineText {
    color: var(--color-text-primary);
    font-weight: 600;
}

.deadlinePassed .deadlineText {
    color: var(--color-text-muted);
    font-style: italic;
}


/* ===========================
   Game Header
=========================== */
.gameHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gameTitle {
    display: flex;
    flex-direction: column;
}
