/* Global styles from levensloop.php */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
}

/* Header Styles */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo img {
    height: 40px;
}

.main-nav .nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .nav-links li {
    margin-left: 1.5rem;
}

.main-nav .nav-links a {
    display: inline-block;
    text-decoration: none;
    color: #006400;
    font-weight: 600;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.main-nav .nav-links a:hover {
    color: #008000;
    text-decoration: underline;
}

.main-nav .nav-links a.active {
    background-color: #006400;
    color: #fff;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

/* Chart container styles */
.chart-container {
}

/* Responsive Styles */
@media (max-width: 768px) {
    .chart-container {
    }
    .tab-container {
        display: none;
    }

    .input-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group {
        width: 100%;
    }

    .main-nav .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: 280px;
        height: 100vh;
        background-color: #006400;
        padding-top: 4rem;
        box-shadow: -4px 0 8px rgba(0,0,0,0.2);
        transition: transform 0.3s ease-in-out;
        z-index: 100;
    }

    .main-nav.active .nav-links {
        transform: translateX(0);
    }

    .main-nav.active .hamburger-inner,
    .main-nav.active .hamburger-inner::before,
    .main-nav.active .hamburger-inner::after {
        background-color: #fff;
    }

    .main-nav .nav-links li {
        margin: 0;
        text-align: left;
        width: 100%;
    }

    .main-nav .nav-links a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid #004488;
        color: #fff;
    }

    .main-nav .nav-links a:hover {
        background-color: #008000;
        color: #fff;
        text-decoration: underline;
    }

    .hamburger {
        display: block;
        position: relative;
        z-index: 101;
        padding: 15px;
        margin: -15px;
    }

    .hamburger-box {
        width: 30px;
        height: 24px;
        display: inline-block;
        position: relative;
    }

    .hamburger-inner {
        display: block;
        top: 50%;
        margin-top: -2px;
    }
    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        width: 30px;
        height: 3px;
        background-color: #006400;
        border-radius: 4px;
        position: absolute;
        transition-property: transform;
        transition-duration: 0.15s;
        transition-timing-function: ease;
    }
    .hamburger-inner::before, .hamburger-inner::after {
        content: "";
        display: block;
    }
    .hamburger-inner::before {
        top: -10px;
    }
    .hamburger-inner::after {
        bottom: -10px;
    }
}

/* Styles from gebeurtenissen.php, with some adjustments for global use */
.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 1600px;
    margin: 0 auto;
}

h1 {
    color: #006400;
    text-align: center;
}

h2 {
    color: #006400;
    text-align: left;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.message.success {
    background-color: #e6ffed;
    color: #2d6a4f;
    border: 1px solid #95d5b2;
}

.message.error {
    background-color: #ffebe6;
    color: #8b0000;
    border: 1px solid #ffb3b3;
}

/* Form-specific styles from gebeurtenissen.php */
.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group.small {
    flex: 0 0 100px;
}

.input-group.large {
    flex: 2;
    min-width: 300px;
}

.input-group-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-row-btn, .remove-row-btn {
    background-color: #006400;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-row-btn:hover, .remove-row-btn:hover {
    background-color: #008000;
}

.remove-row-btn {
    background-color: #ccc;
}

.remove-row-btn:hover {
    background-color: #aaa;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #006400;
}

input[type="text"], input[type="date"], input[type="number"], textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    height: 80px;
}

select {
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

.action-btn {
    display: block;
    background-color: #006400;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.action-btn:hover {
    background-color: #008000;
}

.action-btn.secondary {
    background-color: #228B22;
}

.action-btn.secondary:hover {
    background-color: #006400;
}

/* Combined and refined footer styles */
.footer-container {
    background-color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.footer-logo-placeholder {
    /* Height removed to allow logo to scale naturally, preventing it from being 'too large' if forced */
    margin: 0 auto 2rem auto; /* Increased bottom margin for "breathing room" */
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo-placeholder img {
    max-width: 200px; /* Constrain width to keep it smaller as requested */
    height: auto;
    object-fit: contain;
}

.footer-text {
    font-style: italic;
    color: #228B22;
    font-size: 0.9em;
    line-height: 1.5;
}

.footer-text a {
    color: #228B22;
    text-decoration: underline;
}

.footer-text a:hover {
    color: #006400;
}

/* Styles for details panel in levensloop.php */
#details-panel {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#details-panel.active {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
    padding: 1.5rem;
}

/* --- Tooltip Styles --- */
.privacy-tooltip {
    text-align: right;
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-icon {
    font-weight: bold;
    color: #4A5568;
    background-color: #E2E8F0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.tooltip-container:hover .tooltip-icon {
    background-color: #CBD5E0;
}

.tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #2D3748;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the icon */
    left: 50%;
    margin-left: -140px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    line-height: 1.6;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2D3748 transparent transparent transparent;
}

/* Privacy Tooltip Scoped Overrides */
.privacy-tooltip .tooltip-text {
    right: 0;
    left: auto;
    margin-left: 0;
}

.privacy-tooltip .tooltip-text::after {
    right: 7px;
    left: auto;
    margin-left: 0;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem; /* Added top margin for separation from text */
    margin-bottom: 0;
}

.language-switcher form {
    display: flex;
    align-items: center;
}

.language-switcher input[type="radio"] {
    display: none;
}

.language-switcher label {
    cursor: pointer;
    margin: 0 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.language-switcher input[type="radio"]:checked + label {
    opacity: 1;
    border-bottom: 2px solid #006400;
}

.language-switcher img {
    width: 32px;
    height: 24px;
    vertical-align: middle;
}

/* --- Data Overzicht Tabel (voor beeld_uploader.php) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
    font-size: 0.95em;
    table-layout: fixed;
}
.data-table tr {
    border-bottom: 1px solid #eee;
}
.data-table tr:last-child {
    border-bottom: none;
}
.data-table td {
    padding: 0.75rem;
    vertical-align: top;
    word-wrap: break-word;
}
.data-table td:first-child {
    font-weight: 600;
    color: #006400;
    width: 180px;
}
.data-table a {
    color: #228B22;
    text-decoration: none;
    font-weight: 600;
}
.data-table a:hover {
    color: #006400;
    text-decoration: underline;
}

/* --- Modal (Popup) Stijlen --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    border-radius: 8px;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-align: center;
}
.modal-content h3 {
    color: #006400;
    margin-top: 0;
}
.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.modal-actions .action-btn {
    margin: 0;
    width: 120px;
}
.modal-actions .cancel-btn {
    background-color: #ccc;
}
.modal-actions .cancel-btn:hover {
    background-color: #aaa;
}
#modal-message {
    font-weight: bold;
    margin-top: 1rem;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000; /* Ensure it stays on top */
    border-radius: 5px;
}

.dropdown-content a {
    color: #333 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: normal !important;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #003366 !important;
}

.dropdown.open .dropdown-content {
    display: block;
}

.dropdown.open .dropbtn {
    background-color: #003366;
    color: #fff;
    border-radius: 5px;
}

/* Ensure mobile menu works with dropdowns (simplified for now) */
@media (max-width: 768px) {
    .dropdown {
        display: block;
        width: 100%;
    }
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none;
        background-color: #004488;
        display: none; /* Hidden by default even in mobile */
    }
    .dropdown.open .dropdown-content {
        display: block;
    }
    .dropdown-content a {
        color: #fff !important;
        padding-left: 2rem;
    }
}
