/* style.css */
/* A simple, respectful, and clean stylesheet for the memorial website. */

:root {
    --primary-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-text: #333;
    --color-background: #E0E5CA; 
    ##EEF6C7;
    --color-border: #dee2e6;
    --color-card-bg: #ffffff;
    --color-primary: #859736;
    --currentColor: #859736;
    --color-primary-hover: #000;
    --color-error: #dc3545;
    --color-success: #28a745;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    color: var(--color-text);
    background-color: #F1F3EA;
    ##var(--color-background);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--color-card-bg);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

header, footer {
    text-align: center;
    padding: 20px 0;
    border-bottom: 0px solid var(--color-border);
}

header a {
    margin: 0 5px;
}

footer {
    border-bottom: none;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
    font-size: 0.9em;
    color: #6c757d;
}

h1, h2, h3 {
    color: var(--color-text);
    font-weight: 300;
}

h1 { font-size: 2.5em; margin-bottom: 0.2em; }
h2 { font-size: 2em; border-bottom: 1px solid var(--color-border); padding-bottom: 10px; margin-top: 40px; margin-bottom: 20px;}
h3 { font-size: 1.5em; }

/* Message styles */
.error {
    color: var(--color-error);
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}
.success {
    color: var(--color-success);
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

/* Buttons */
.button, .button-secondary {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.button {
    background-color: var(--color-primary);
    color: #fff;
}

.button:hover {
    background-color: var(--color-primary-hover);
}

.button-secondary {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
}
.button-secondary:hover {
    background-color: #dee2e6;
}

/* Obituary List on index.php */
.obituary-list {
    display: grid;
    gap: 30px;
}

.obituary-card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.obituary-card .obituary-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.obituary-card h3 a {
    text-decoration: none;
    color: var(--color-text);
}
.obituary-card h3 a:hover {
    color: var(--color-primary);
}

.dates {
    font-style: italic;
    color: #6c757d;
    margin: 5px 0;
}

.summary {
    color: #495057;
    margin-bottom: 15px;
}

.read-more {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
}

/* Obituary Detail Page */
.obituary-detail {
    text-align: center;
}

.obituary-image-large {
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.obituary-full-text {
    text-align: left;
    margin-top: 30px;
    white-space: pre-wrap; /* Preserves line breaks from textarea */
    font-size: 1.1em;
    line-height: 1.7;
}

/* Forms */
.modern-form {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
}
.form-group input[type="file"] {
    width: 100%;
}
.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #6c757d;
}

/* Condolences Section */
.condolences {
    margin-top: 40px;
}

.condolence-card {
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
    display: flex; /* NEU: Flexbox für Icon und Text */
    gap: 20px; /* NEU: Abstand zwischen Icon und Text */
    align-items: flex-start; /* NEU: Oben ausrichten */
}
.condolence-card:last-child {
    border-bottom: none;
}

.condolence-icon { /* NEU */
    flex-shrink: 0;
    color: #859736;
}

.condolence-main-content { /* NEU */
    flex-grow: 1;
}

.condolence-card .message {
    font-style: italic;
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 10px;
}
.condolence-card .author {
    text-align: right;
    font-weight: bold;
    color: #495057;
}
.condolence-card .timestamp {
    text-align: right;
    font-size: 0.8em;
    color: #6c757d;
}

/* NEU: Icon Selector Styles */
.icon-selector {
    display: flex;
    gap: 15px;
    align-items: center;
}
.icon-option {
    padding: 10px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.icon-option:hover {
    background-color: #e9ecef;
    border-color: var(--color-primary);
}
.icon-option input[type="radio"] {
    display: none; /* Versteckt den Standard-Radio-Button */
}
.icon-option input[type="radio"]:checked + svg {
    stroke: var(--color-primary);
    stroke-width: 1.5;
}
.icon-option svg {
    display: block;
    color: #888;
    transition: all 0.2s ease-in-out;
}

/* Admin Area Styles */
.admin-table-container {
    overflow-x: auto; /* For mobile Ansicht */
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    border: 1px solid var(--color-border);
    padding: 12px;
    text-align: left;
}

.admin-table th {
    background-color: var(--color-background);
    font-weight: 600;
}

.admin-table tr:nth-child(even) {
    background-color: var(--color-background);
}

.admin-table .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-table .actions form {
    margin: 0;
}

.button-delete {
    background-color: var(--color-error);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}
.button-delete:hover {
    opacity: 0.9;
}

.status-verified {
    color: var(--color-success);
    font-weight: bold;
}

.status-pending {
    color: #ffc107; /* Gelb für ausstehend */
    font-weight: bold;
}
/* --- Stile für die Bildvorschau im Bearbeitungsformular --- */
.image-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--color-background);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--color-border);
}

.image-preview img {
    max-width: 100px;
    height: auto;
    border-radius: 5px;
}

.delete-image-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
}
/* --- Stile fr rechtliche Seiten und Footer-Links --- */
.legal-content {
    padding: 20px 0;
    line-height: 1.8;
}

.legal-content h2 {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: none;
}

.legal-content h3 {
    font-size: 1.4em;
    margin-top: 25px;
    margin-bottom: 10px;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.legal-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legal-links a {
    color: var(--color-text);
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}
/* --- Stile fr das Cookie-Banner --- */
/* --- Stile fr das Cookie-Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0; /* Stellt sicher, dass es die volle Breite einnimmt */
    width: 100%;
    background-color: rgba(30, 30, 30, 0.98); /* Etwas dunkler fr besseren Kontrast */
    color: #fff;
    padding: 20px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25);
    z-index: 9999; /* Sehr hoher z-index, um ber allem zu liegen */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Feine Trennlinie */
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
    font-size: 0.9em;
}

.cookie-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-banner .button {
    background-color: var(--color-primary);
    flex-shrink: 0;
	margin-right: 5%;
}
/* --- Stile fr Melde-Funktion --- */
.report-container {
    text-align: right;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}
.report-link {
    font-size: 0.7em;
    color: #859736;
    text-decoration: none;
}
.report-link:hover {
    text-decoration: underline;
}

.condolence-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}
.condolence-footer .meta-info {
    text-align: right;
}
.report-link-small {
    font-size: 0.6em;
    color: #859736;
    text-decoration: none;
    display: block;
    margin-top: 5px;
    float:right;
}
.report-link-small:hover {
    text-decoration: underline;
}

/* --- Stile fr die Zustimmungs-Checkbox --- */
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8em;
    color: #6c757d;
    cursor: pointer;
}

.consent-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 4px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.consent-label a {
    color: var(--color-primary);
    text-decoration: underline;
}

.consent-label a:hover {
    text-decoration: none;
}

/* --- Stile fr die Paginierung --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination a {
    color: var(--color-primary);
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    transition: background-color 0.2s, color 0.2s;
}
.pagination a:hover {
    background-color: #e9ecef;
}
.pagination a.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    font-weight: bold;
    cursor: default;
}
