﻿body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f5f7fa;
}

header {
    background-color: #004d80;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    header h1 {
        margin: 0;
        font-size: 18px;
    }

nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
}

.filters {
    background: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 10px;
}

select, input[type="text"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

th, td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #e8f0fa;
    cursor: pointer;
}

tr:hover {
    background-color: #f1f9ff;
}

.action-btn {
    padding: 4px 8px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
/* Popup */
/* Achtergrond laag */
.popup {
    display: none; /* standaard verborgen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* semi-transparant zwart */
    z-index: 9999; /* altijd boven */
}

/* Popup venster */
.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 88%; /* breder */
    max-width: 1400px; /* max breedte */
}

    .popup-content label {
        display: inline-block;
        width: 120px; /* vaste breedte voor labels */
        font-weight: bold;
        margin-right: 10px;
    }

    .popup-content input[type="text"],
    .popup-content select {
        width: calc(100% - 140px); /* label + margin */
        padding: 6px;
        margin-bottom: 10px;
    }


/* Sluit-knop rechtsboven */
.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}



.ticketdetail {
    display: none; /* standaard verborgen */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* semi-transparant zwart */
    z-index: 10000; /* boven alles */
}

.ticketdetail-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff; /* witte achtergrond */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 1200px;
    padding: 0; /* header/body apart stylen */
    overflow: hidden;
    font-family: Arial, sans-serif;
    color: #333;
}


/* Header */
.ticketdetail-header {
    background: #2c3e50;
    color: #fff;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .ticketdetail-header h2 {
        margin: 0;
        font-size: 18px;
    }

.ticketdetail-close {
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
}

/* Body */
.ticketdetail-body {
    display: flex;
    flex-direction: column; /* alles onder elkaar */
    gap: 20px;
    padding: 20px;
}

.ticketdetail-info {
    flex: 2;
}

    .ticketdetail-info table {
        border-collapse: collapse;
        width: 100%;
        margin-bottom: 12px;
    }

    .ticketdetail-info th {
        text-align: left;
        padding: 3px 6px;
        width: 120px;
        font-weight: bold;
    }

    .ticketdetail-info td {
        padding: 3px 6px;
    }

/* Prioriteit labels */
.ticketdetail-prio {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #fff;
}

    .ticketdetail-prio.hoog {
        background: #e74c3c;
    }

    .ticketdetail-prio.normaal {
        background: #f39c12;
    }

    .ticketdetail-prio.laag {
        background: #27ae60;
    }

/* Afbeelding */
.ticketdetail-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

    .ticketdetail-image img {
        max-width: 100%;
        border: 1px solid #ddd;
        border-radius: 4px;
    }


/* bovenste blok (info + foto) naast elkaar */
.ticketdetail-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}



/* reacties nu onder hele breedte */
.ticketdetail-reacties {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    max-height: 250px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* bubbels zelfde als eerder */
.reactie {
    margin: 10px 0;
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    clear: both;
}

.reactie-naam {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 3px;
}

.reactie-tijd {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-align: right;
}

/* Reacties van anderen links */
.reactie.andere {
    background: #e5e5ea;
    float: left;
    border-top-left-radius: 0;
}

/* Mijn reacties rechts */
.reactie.mijn {
    background: #dcf8c6;
    float: right;
    border-top-right-radius: 0;
}


.ticketdetail-reactieform {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background: #fafafa;
}

    .ticketdetail-reactieform textarea {
        flex: 1;
        resize: none;
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
        font-family: Arial, sans-serif;
        min-height: 40px;
    }

    .ticketdetail-reactieform button {
        background: #007bff;
        color: #fff;
        border: none;
        border-radius: 6px;
        padding: 8px 16px;
        cursor: pointer;
        font-size: 14px;
    }

        .ticketdetail-reactieform button:hover {
            background: #0056b3;
        }

.attachments {
    margin-top: 5px;
}

.upload-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-bottom: 10px;
    width:200px !important;
}

    .upload-btn:hover {
        background: #0056b3;
    }

.attachments-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .attachments-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fafafa;
        margin-bottom: 6px;
    }

        .attachments-list li .file-name {
            flex: 1;
        }

.delete-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

    .delete-btn:hover {
        background: #c0392b;
    }
