:root {
    --vacation-color: #f0f0f0;
    --zebra-stripe-color: #f5f5f5;
}

#legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    font-style: italic;
}

.legend-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 40px;
    height: 20px;
    border-radius: 4px;
}

/* Zorg dat current-day ook werkt op table cells */
table td.current-day {
    background-color: yellow !important;
}

.current-sprint { 
    background-color: lightblue !important;
    width: 90px !important; /* Breder voor 'Huidige Sprint' */
}

.current-week {
    border: 2px solid black;
}

/* Zebra striping voor betere leesbaarheid */
table tr:nth-child(even):not(.vacation) {
    background-color: var(--zebra-stripe-color);
}

/* Kerstvakantie styling met emoji's */
table tr.vacation td {
    background-color: var(--vacation-color);
    text-align: center;
    font-size: 18px;
}

/* Emoji's voor de vakantiedagen */
table tr.vacation td:nth-child(2)::before { content: "🎄"; } /* Kerstboom op maandag */
table tr.vacation td:nth-child(3)::before { content: "🎅"; } /* Kerstman op dinsdag */
table tr.vacation td:nth-child(4)::before { content: "🎁"; } /* Cadeau op woensdag */
table tr.vacation td:nth-child(5)::before { content: "❄️"; } /* Sneeuwvlok op donderdag */
table tr.vacation td:nth-child(6)::before { content: "🌟"; } /* Ster op vrijdag */

/* Kleuren uitleg:
 * - Geel (current-day): Markeert de geselecteerde dag in de datepicker
 * - Lichtblauw (current-sprint): Markeert de werkdagen van de geselecteerde sprint
 * - Grijs (zebra striping): Alternerende rijen voor betere leesbaarheid
 * - Grijs (vacation): Kerstvakantie weken
 * - Donkergroen tekst: Maandag en Vrijdag (belangrijke dagen: kick-off, reviews)
 * - Oranje tekst: Dinsdag (opvallend voor belangrijke activiteiten)
 */

/* Tekstkleuren voor belangrijke dagen:
 * - Maandag en Vrijdag: Donkergroen (kick-off, reviews, belangrijke momenten)
 * - Dinsdag: Oranje (opvallend voor belangrijke activiteiten)
 */
tr:not(.vacation) td:nth-child(2), /* Maandag */
tr:not(.vacation) td:nth-child(6) /* Vrijdag */
{
    color: darkgreen;
}

tr:not(.vacation) td:nth-child(3) /* Dinsdag */
{
    color: darkorange;
}

#selected-day-content {
    margin-top: 20px;
}

#sprint-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

#sprint-select {
    font-size: 18px;
    font-weight: bold;
    color: #0056b3; /* Donkerblauw voor betere zichtbaarheid */
    padding: 5px 10px;
    border: 2px solid #0056b3;
    border-radius: 8px;
    background-color: #e0f0ff; /* Lichtblauwe achtergrond */
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtiele schaduw */
    transition: all 0.3s ease; /* Animatie voor hover-effect */
}

#sprint-select:hover {
    color: #ffffff;
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Donkere schaduw bij hover */
}

#sprint-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

#sprint-progress-bar {
    width: 200px;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#progress-fill {
    height: 100%;
    background-color: lightblue;
    transition: width 0.3s ease;
}

#progress-fill.green {
    background-color: green;
}

#progress-fill.yellow {
    background-color: orange;
}

#progress-fill.red {
    background-color: red;
}

#days-until-review {
    font-size: 12px;
    margin-top: 5px;
    color: #333;
}

#days-until-review.green {
    color: green;
}

#days-until-review.yellow {
    color: orange;
}

#days-until-review.red {
    color: red;
}

#date-picker-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 150px;
}

label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

#date-picker {
    padding: 5px;
    font-size: 16px;
    width: auto;
    min-width: 150px; /* Vergroot het klikgebied */
    cursor: pointer;
}

/* 3D Flip Cards voor Tech Reviews en Sprint Reviews */
table td {
    position: relative;
    /* Transition voor tabelcel groei */
    transition: min-height 0.6s ease-in-out, min-width 0.6s ease-in-out;
}

table td .tech-review-card,
table td .sprint-review-card {
    perspective: 1000px;
    display: block;
    width: 100%;
    height: 80px;
    cursor: pointer;
    margin: 0;
    border-radius: 12px;
    overflow: visible;
    position: relative;
    /* Flip start pas na tabelcel groei (0.6s delay) */
    transition: transform 0.6s ease-in-out 0.6s, width 0.6s ease-in-out, height 0.6s ease-in-out;
}

table td .tech-review-card .card-inner,
table td .sprint-review-card .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    text-align: center;
    /* Flip start pas na tabelcel groei (0.6s delay) */
    transition: transform 0.6s ease-in-out 0.6s;
    transform-style: preserve-3d;
}

/* Zorg dat de tabelcel meeschaalt wanneer een card geflipped is */
table td:has(.tech-review-card.flipped),
table td:has(.sprint-review-card.flipped) {
    min-height: 200px;
    min-width: 300px;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

table td .tech-review-card.flipped,
table td .sprint-review-card.flipped {
    width: 100%;
    min-height: 200px;
    height: auto;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

table td .tech-review-card.flipped .card-inner,
table td .sprint-review-card.flipped .card-inner {
    transform: rotateY(-180deg);
}

table td .tech-review-card .card-front,
table td .tech-review-card .card-back,
table td .sprint-review-card .card-front,
table td .sprint-review-card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

table td .tech-review-card .card-front,
table td .sprint-review-card .card-front {
    color: #e2e8f0;
    font-weight: bold;
    flex-direction: column;
}

table td .tech-review-card .card-front {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

table td .sprint-review-card .card-front {
    background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
}

table td .tech-review-card .card-back {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #e2e8f0;
    transform: rotateY(-180deg);
    text-align: left;
    font-size: 0.7em;
    line-height: 1.2;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    min-height: 200px;
    width: 100%;
}

table td .sprint-review-card .card-back {
    background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
    color: #e2e8f0;
    transform: rotateY(-180deg);
    text-align: left;
    font-size: 0.7em;
    line-height: 1.2;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    min-height: 200px;
    width: 100%;
}

table td .tech-review-card .card-back strong,
table td .sprint-review-card .card-back strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95em;
    text-decoration: underline;
    color: #ffffff;
}

