﻿
#clipstable {
    table-layout: fixed;
    width: 100%;
    font-size: 12px;
    padding: 0px;
    margin: 0px;
}

#clipstable .minutecol {
    width: 10%;
}
#clipstable .iconcol{
    width:70px;
}

#clipstable .creatorcol {
    width: 20%;
}

#clipstable .smallcolumn {
    width: 10%;
}

#gameinfo {
    overflow-y: scroll;
    height: 85vh;
}

#gamevideo {
   
}

#clipdescription {
    height:80px;
    font-size:12px;
}

#refereestable nosort {
    background-image: none !important;
}

.legend .row:nth-of-type(odd) div {
    background-color: antiquewhite;
}

.legend .row:nth-of-type(even) div {
    background: #FFFFFF;
}


.matchclock {
    font-weight: 600;
    font-size:larger;
    max-width: 100px;
}



.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    overflow: auto;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.tagbutton {
    padding: .25rem .4rem;
    font-size: .875rem;
    line-height: .5;
    border-radius: .2rem;
}

.scale-box {
    width: 50px;
    height: 50px;
    aspect-ratio: 1 / 1;
    color: black;
    border-width: 1px;
    border-color: black;
    border-style: solid;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.scale-box-header {
    width: 30px;
    height: 30px;
    aspect-ratio: 1 / 1;
    color: black;
    border-width: 1px;
    border-color: black;
    border-style: solid;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.scale-box.markmydecision.selecteddecision {
    border-width: 3px;
    transform: scale(1.3);
}


.scale-box:hover {
    transform: scale(1.1);
}
.remove-btn {
    margin-top: 32px;
}

.video-card {
    overflow: hidden;
}

.video-thumbnail-container {
    height: 100%;
    overflow: hidden;
}

    .video-thumbnail-container img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }


.scrollable-tag-list {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 5px; /* för scroll-indikatorn */
}

.object-fit-cover {
    object-fit: cover;
}

body {
    font-family: 'Noto Sans', sans-serif;
}


/* Menybakgrund */
.navbar {
    background-color: #005293 !important;
}

    /* Länkar i navbaren */
    .navbar .nav-link,
    .navbar .navbar-brand {
        color: #ffffff !important;
        font-weight: bolder !important;
        font-size: 19px !important;
    }

        /* Hover-effekter */
        .navbar .nav-link:hover,
        .navbar .nav-link:focus {
            color: #ffc600 !important;
        }

    /* Dropdown-meny */
    .navbar .dropdown-menu {
        background-color: #005293 !important;
        border: none;
    }

    .navbar .dropdown-item {
        color: #ffffff !important;
    }

        .navbar .dropdown-item:hover,
        .navbar .dropdown-item:focus {
            color: #ffc600 !important;
            background-color: transparent !important;
        }

.videoreportrow
{
    font-size:14px;
}

.table-warning {
    animation: highlightRow 2s ease-in-out;
    background-color: #fff3cd !important;
}

@keyframes highlightRow {
    0% {
        background-color: #ffeeba;
    }

    100% {
        background-color: #fff3cd;
    }
}

.fixed-col {
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

.accordion-body .table {
    table-layout: fixed;
    font-size: 0.875rem; /* motsvarar ca 14px - 2px = 12px */
}

.accordion-body .table td,
.accordion-body .table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specifikt för beskrivningskolumnen (valfritt) */
#videoclipstable td:nth-child(4) {
    max-width: 200px;
}

/* Valfri maxbredd på hela tabellen i accordions */
.accordion-body .table-responsive {
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 576px) {
    .scale-box {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.75rem;
    }

    .accordion-header .col-1 {
        padding: 2px;
    }

    .accordion-header small {
        font-size: 0.7rem;
    }
}

@media (max-width: 1084px) {
    .accordion-header small {
        display: none;
    }
}

.descision .accordion-header .accordion-button {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}


@media screen and (max-width: 768px) {
    #gamesTable {
        font-size: 12px;
    }

        #gamesTable th, #gamesTable td {
            white-space: nowrap;
        }
}

@media screen and (max-width: 576px) {
    #gamesTable {
        font-size: 10px;
    }
}

#refereestable {
    font-size: 14px;
}

@media screen and (max-width: 576px) {
    .accordion-button {
        font-size: 14px;
        padding: 0.75rem 1rem;
    }

    table th, table td {
        font-size: 12px;
    }
}


.five-card-grid .video-item {
    width: 20%; /* 5 per rad */
}

@media (max-width: 1400px) {
    .five-card-grid .video-item {
        width: 25%; /* 4 per rad på mindre skärmar */
    }
}

@media (max-width: 992px) {
    .five-card-grid .video-item {
        width: 33.33%;
    }
}

@media (max-width: 768px) {
    .five-card-grid .video-item {
        width: 50%;
    }
}

@media (max-width: 576px) {
    .five-card-grid .video-item {
        width: 100%;
    }
}

.select2-container {
    width: 100% !important;
}

.select2-selection--multiple {
    min-height: 38px; /* matchar .form-control */
}

.tooltip {
    position: absolute !important;
    z-index: 1080; /* säkerställ att den syns över annat */
}

.selected-filter {
    border: 2px solid #000;
    border-radius: 6px;
    padding: 2px 4px;
}

.decision-table {
    
    width: 100%;
    table-layout: fixed; /* Viktigt för att kunna styra kolumnbredd */
}

    .decision-table th,
    .decision-table td {
        vertical-align: top;
        word-break: break-word;
        white-space: normal; /* Viktigt för att tillåta radbrytning överallt */
    }

/* Fixerade bredder för kolumner */
.col-thumbnail {
    width: 100px;
}

.col-id {
    width: 60px;
}

.col-decisiontype {
    width: 260px; /* Lägg till fast bredd */
    font-size: 0.75rem;
}

.col-decisiongameinfo {
    width: 260px; /* Lägg till fast bredd */
    font-size: 0.75rem;
}

.col-decisionvalue {
    width: 80px;
}

/* Beslutskolumn – tillåter radbrytning och tar resten av utrymmet */
.col-decision {
    font-size: 0.75rem;
}

.clip-thumbnail-container img {
    max-width: 100px;
    height: auto;
    cursor: pointer;
}


.scale-box.disabled-click {
    opacity: 0.5;
    pointer-events: none; /* Alternativ till JS-baserad blockering */
    cursor: not-allowed;
}

.date-updated {
    background-color: #d4edda !important; /* ljusgrön bakgrund */
    border-color: #28a745 !important;
}

.clickablerow {
    cursor: pointer;
}

#drawing-tools {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    transition: opacity 0.3s ease;
    opacity: 0.5;
}

    #drawing-tools:hover {
        opacity: 1;
    }

.draw-btn {
    background: white;
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.draw-color {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

@media (max-width: 768px) {
    #drawing-tools {
        display: none !important;
    }
}

.video-icon-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

    .video-icon-button:hover {
        opacity: 1;
    }

@media (max-width: 768px) {
    #popup-button-container {
        display: none !important;
    }
}


.accordion-button {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    line-height: 1.2;
}

.accordion-body {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem;
    line-height: 1.3;
}

.accordion-header {
    margin-bottom: 0 !important;
}
.RefereeGradeTable {
    text-align: left !important;
    font-size: 0.9rem !important;
}

.areacolumn {
    width: 30px;
}

#gamesTable.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

    #gamesTable.loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        background-color: rgba(255,255,255,0.95);
        transform: translate(-50%, -50%);
        z-index: 10;
    }

    #gamesTable.loading::before {
        content: "Laddar matcher...";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -40%);
        font-weight: bold;
        font-size: 1.2rem;
        color: #333;
        z-index: 11;
    }

    #gamesTable.loading .fa-spinner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, 20%);
        z-index: 11;
        font-size: 1.8rem;
        color: #666;
    }
.clip-action-col {
    width: 40px;
    transition: width 0.3s ease;
    white-space: nowrap;
    vertical-align: top;
}

    .clip-action-col.expanded {
        min-width: 300px;
    }

.icon-panel-wrapper {
    display: flex;
    align-items: flex-start;
}

.toggle-icon {
    margin-right: 0.5rem;
    margin-top: 0.3rem;
}

.icon-panel {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-box {
    text-align: center;
    padding: 6px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    width: 40px;
}

.calendar-slot-container {
    position: relative;
    height: 900px; /* 15h * 60min * 1px = 900px */
    background: repeating-linear-gradient(to bottom, #f8f9fa, #f8f9fa 59px, #e9ecef 60px);
}

.calendar-time-block {
    height: 60px;
    padding-top: 2px;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #dee2e6;
    text-align: right;
    padding-right: 5px;
}

.calendar-col {
    border-left: 1px solid #ccc;
    padding: 0 5px;
}

.calendar-event {
    position: absolute;
    left: 5px;
    right: 5px;
    background-color: #007bff;
    color: black;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    overflow: hidden;
}

.group-legend-box {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 2px;
}

.group-legend-item {
    margin-right: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.stream-wrapper {
    padding: 0.5rem;
}

.stream-card {
    height: 100%;
    width: 100%;
}

.stream-body {
    height: 100%;
    padding: 0;
}

.stream-video video {
    height: 100% !important;
    width: 100% !important;
}

.stream-header {
    font-weight: bold;
    text-align: center;
    padding: 0.5rem;
}

.stream-container {
    display: flex;
    flex-wrap: wrap;
    height: 100vh;
    width: 100%;
    margin: 0;
}

.stream-item {
    padding: 0.25rem;
}

.modalcliptimeaddremove {
    display: inline-block;
    background-color: rgba(43, 51, 63, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    user-select: none;
    text-align: center;
}

.modalcliptimeaddremove:hover {
    background-color: rgba(43, 51, 63, 1);
}

#rightCol .accordion .accordion-body {
    overflow: auto;
}


/* ========== Layout (vänster filter + höger schema) ========== */
.assignments-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

.filter-panel {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

    .filter-panel .form-group {
        margin-bottom: 10px;
    }

.series-list {
    max-height: 260px;
    overflow: auto;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 6px;
    background: #fafafa;
}

.schedule-panel {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.toolrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* ========== Schema: scroll & sticky kolumn/huvud ========== */
#scheduleContainer {
    overflow-x: auto; /* horisontell scroll */
    overflow-y: hidden;
    width: 100%;
}

/* Låt tabellen bli bredare än containern -> ger scroll när många datum */
table#scheduleTable {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto; /* låt kolumner ta plats */
    width: auto; /* växer med antalet kolumner */
    min-width: 900px; /* grundbredd så det inte hoppar */
}

/* Sticky header */
#scheduleTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    text-align: center;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
}

/* Sticky första kolumnen (rubrik + cell) */
#scheduleTable th.referee-col,
#scheduleTable td.referee-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 3;
    min-width: 220px;
    text-align: left;
}

/* Datumkolumner: minsta bredd för att motverka ihoptryckning */
#scheduleTable th.date-col,
#scheduleTable td.date-col {
    min-width: 90px;
}

/* Celler */
#scheduleTable td {
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    padding: 6px 4px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

    #scheduleTable td.empty {
        cursor: default;
    }

/* Valfritt: ljus bakgrund på helgkolumner */
#scheduleTable thead th.wknd,
#scheduleTable tbody td.wknd {
    background-color: #fff1f2; /* mycket ljus röd/rosa */
}


/* ========== Badges (L / AD / D) – hög kontrast ========== */
#scheduleTable td .badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 12px;
    margin: 1px 2px;
    font-weight: 700;
    border: 1px solid transparent;
}

/* D = Domare (exempel: blå) */
.ev-D {
    background: #2563eb;
    color: #fff;
    border-color: #1e40af;
}

/* AD = Assisterande (exempel: orange) */
.ev-AD {
    background: #d97706;
    color: #fff;
    border-color: #92400e;
}

/* L = Ledig (exempel: röd) */
.ev-L {
    background: #dc2626;
    color: #fff;
    border-color: #991b1b;
}

/* Låt bara själva schemakontainern scrolla */
.schedule-panel {
    overflow: hidden; /* hindra panelen från att få egna scrollbars */
}

#scheduleContainer {
    overflow: auto; /* båda axlarna scrollar här */
    max-height: 70vh; /* justera höjd efter behov */
    -webkit-overflow-scrolling: touch; /* smooth scroll på iOS */
}

/* Datumkolumnernas min-bredd + tabellbredden gör att horisontell scroll triggas */
#scheduleTable {
    width: auto; /* låt tabellen bli bredare än containern */
    table-layout: auto;
}

#scheduleTable th.date-col,
#scheduleTable td.date-col {
    min-width: 90px; /* tvingar horisontell scroll när många dagar */
}

    /* Headerlayout: badge över datum */
    #scheduleTable th.date-col .date-head {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    #scheduleTable th.date-col .date-label {
        line-height: 1;
    }

    #scheduleTable th.date-col .date-badge {
        display: inline-block;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 700;
        background: #334155; /* mörk skiffer */
        color: #fff;
    }
    /* valfritt: annan färg på helger */
    #scheduleTable thead th.wknd .date-badge {
        background: #991b1b;
    }

/* Roller-knappar i modalen */
.games-roles {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

    .games-roles .btn-role {
        padding: 3px 8px;
        font-size: 12px;
    }

/* Badge för lokala tillsättningar (skilj från D/AD/L) */
.badge-local {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 12px;
    margin: 1px 4px 0 0;
    font-weight: 700;
    background: #7c3aed; /* lila */
    color: #fff;
    border: 1px solid #5b21b6;
    cursor: pointer; /* klickbar för borttag */
}

    .badge-local:hover {
        opacity: .9;
    }
.local-assignments-panel .toolrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.local-assignments-panel td .fogis-link {
    white-space: nowrap;
}

.local-assignments-panel .btn-del {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

    .local-assignments-panel .btn-del:hover {
        opacity: .8;
    }