/* Algemene reset en basis stijlen */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arial", sans-serif;
}

:root {
    --primary-color: #4a90e2;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f5f5f5;
    color: var(--dark-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Knoppen stijlen */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: #357ABD;
}

.action-btn {
    background-color: var(--success-color);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.action-btn:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Login scherm */
.screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#login-screen {
    justify-content: center;
    align-items: center;
    background-color: var(--light-color);
}

.login-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

/* Formulier elementen */
.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
}

.error-message {
    color: var(--danger-color);
    margin-top: 10px;
    text-align: center;
}

/* Hoofdscherm */
header {
    background-color: white;
    padding: 15px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    color: var(--primary-color);
    font-size: 1.5em;
}

.filter-container {
    margin: 0 10px;
    flex-grow: 1;
    max-width: 200px;
}

/* Navigatie */
.nav-container {
    display: flex;
    margin: 0 15px;
}

.nav-link {
    color: var(--dark-color);
    text-decoration: none;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-link:hover:not(.active) {
    background-color: var(--light-color);
}

main {
    padding: 20px;
}

/* Content containers */
.content-container {
    display: none;
}

.content-container.active {
    display: block;
}

/* Dashboard styling */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dashboard-column {
    width: 100%;
}

.dashboard-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 100%;
}

.dashboard-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4em;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* Prikbord styling */
.prikbord-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.prikbord-item {
    padding: 15px;
    border-radius: 8px;
    background-color: var(--light-color);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.prikbord-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.prikbord-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.prikbord-header h3 {
    font-size: 1.1em;
    color: var(--dark-color);
}

.prikbord-timestamp {
    font-size: 0.8em;
    color: #6c757d;
    text-align: right;
}

/* Grafiek containers */
.chart-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chart-canvas-container {
    flex-grow: 1;
    position: relative;
    min-height: 300px;
}

/* Temperatuur kaart */
.temp-chart {
    text-align: center;
    padding: 20px 0;
}

.temp-value {
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.temp-value i {
    color: var(--danger-color);
}

.temp-average {
    font-weight: bold;
}

/* Borstvoeding kaart */
.feeding-summary {
    text-align: center;
    padding: 20px 0;
}

.feeding-value {
    font-size: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feeding-value i {
    color: var(--success-color);
}

.feeding-average {
    font-weight: bold;
}

/* Activiteiten kaarten */
.activity-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.activity-card-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-type {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 0.8em;
}

.activity-card-body {
    padding: 15px;
}

.activity-description {
    margin-bottom: 15px;
}

.activity-details {
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.activity-detail {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

.activity-detail i {
    color: var(--primary-color);
    margin-right: 5px;
}

.has-attachment {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
}

.has-attachment i {
    margin-right: 5px;
}

.activity-timestamp {
    color: #6c757d;
    font-size: 0.85em;
    text-align: right;
}

.attachment-container {
    margin-top: 15px;
}

.attachment-container img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.attachment-container img:hover {
    transform: scale(1.02);
}

/* Activiteitsdetail styling */
.activity-detail-content {
    max-width: 700px;
}

.activity-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.activity-detail-body {
    padding: 10px 0;
}

/* Foto galerij */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    height: 200px;
    background-color: #f8f9fa;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-label {
    opacity: 1;
}

/* Modal stijlen */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    z-index: 101;
}

#preview-container {
    margin-top: 10px;
    text-align: center;
}

#image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

/* Lightbox */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-details {
    width: 100%;
    background-color: white;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
}

.lightbox-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.lightbox-details p {
    margin-bottom: 5px;
}

/* Responsive ontwerp */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-column:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-column {
        grid-column: span 1 !important;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }
    
    header h1 {
        margin-bottom: 10px;
        text-align: center;
    }
    
    .nav-container {
        margin: 10px 0;
        justify-content: center;
    }
    
    .filter-container {
        margin-bottom: 10px;
        max-width: none;
    }
    
    #add-btn {
        align-self: flex-end;
    }
    
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .activity-details {
        grid-template-columns: 1fr;
    }
}

/* Knoppen voor bewerken en verwijderen */
.activity-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.edit-btn {
    background-color: var(--primary-color);
    color: white;
}

.edit-btn:hover {
    background-color: #357ABD;
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background-color: #bd2130;
}

/* Toegevoegde opmerking voor bijlage */
#attachment-note {
    margin-top: 5px;
    font-style: italic;
    color: #6c757d;
}


