body {
	font-family: Arial, sans-serif;
	font-size: 14px;
	padding: 20px;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin-top: 10px;
}

th, td {
	border: 1px solid #ccc;
	padding: 8px;
}

th {
	background-color: #f2f2f2;
}

a {
	color: #007bff;
	text-decoration: none;
}

/* List of geosites */

.geosites-table {
    flex: 3;
    border-collapse: collapse;
    width: 100%;
}

.geosites-table th, .geosites-table td {
    border: 1px solid #ccc;
    padding: 6px 8px;
}

.geosites-table th {
    background-color: #d9edf7;
}

#geositemap {
    flex: 2;
    height: 500px;
}

.geosites-table tbody tr:hover {
    background-color: #f0f8ff;
    cursor: pointer;
}

.highlight {
    background-color: #fffa8a !important;
}


/* Page container */
.page-container {
    max-width: 800px;
    margin: 0 auto;
    background: #f9f9ff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Page container on geosite page */
.geosite-page-container {
    max-width: 1400px;
    margin: 0 auto;
    background: #f9f9ff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Header */
.page-container h1, .geosite-page-container h1 {
    margin-bottom: 20px;
	margin-top: 20px;
    color: #007BFF;
    font-size: 22px;
}

h2 {
    margin-bottom: 20px;
    color: #000000;
    font-size: 18px;
}

h3 {
    margin-bottom: 20px;
    color: #000000;
    font-size: 16px;
}

/* Error */
.error-message {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Form */
.form-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Fields */
.form-group label,
.form-group-inline label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-group-inline input,
.form-group-inline select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.form-group-inline {
    display: flex;
    gap: 20px;
}

.form-group-inline > div {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* input[type=file] */
input[type="file"] {
    border: 1px solid #ccc;
    padding: 6px;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

/* textarea */
textarea {
    resize: vertical;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
}

form h3 {
    margin-top: 20px;
    font-size: 16px;
    color: #007BFF;
    border-bottom: 1px solid #007BFF;
    padding-bottom: 4px;
}

/* Messages (success / error) */
.form-message {
    padding: 10px 14px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

/* Messages: success */
.form-message.success {
    background-color: #d4edda;
    border: 1px solid #a3d9a5;
    color: #155724;
}

/* Messages: error */
.form-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}


/* Map and table */
.content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.elements-list {
    flex: 3;
}

#mapspace {
    flex: 2;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

#map {
    height: 80vh;
}

/* Two columns for geosite descriptions */
.two-columns {
    display: flex;
    gap: 40px;
}

.column {
    flex: 1;
}

/* mobile version */
@media (max-width: 768px) {
    .two-columns {
        flex-direction: column;
    }
}

/* Main element table */
.elements-table {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
}

.elements-table th {
    background-color: #d9edf7;
}

.elements-table tr.usebackground {
    background-color: #dddddd;
	font-weight: bold;
}

/* Theme table */
.themes-table {
    background-color: #fff3cd;
    border: 1px solid #e0c97f;
	font-weight: normal;
}

.themes-table th {
    background-color: #ffeeba;
}

.themes-table td {
    background-color: #fff8e1;
}

/* Time scales table */
.timescales-table {
    background-color: #d4edda;
    border: 1px solid #a3d9a5;
	font-size: 0.85em;
	font-weight: normal;
}

.timescales-table th {
    background-color: #c3e6cb;
}

.timescales-table td {
    background-color: #e2f0e2;
}

/* Bioculturals table */
.bioculturals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    font-size: 0.9em;
}

.bioculturals-table th,
.bioculturals-table td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: left;
    font-weight: normal;
}

.bioculturals-table th {
    background-color: #f0f4f8;
    color: #333;
}

.bioculturals-table tr:nth-child(even) {
    background-color: #fafafa;
}

.bioculturals-table tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Table spacings */
.elements-table, .themes-table, .timescales-table, .bioculturals-table {
    border-collapse: collapse;
    margin-bottom: 10px;
}

td, th {
    padding: 6px 10px;
}

/* Buttons */

.top-buttons {
    margin-bottom: 20px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    padding: 8px 14px;
    border: 2px solid #007BFF;
    border-radius: 6px;
    text-decoration: none;
    color: #007BFF;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.btn-link:hover {
    background-color: #007BFF;
    color: #fff;
}

.btn-link svg {
    margin-right: 6px;
}

/* Classifications */

fieldset.classification {
	width: 100%;
    border: 1px solid #007BFF;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 10px;
    background-color: #f9f9ff;
}

fieldset.classification legend {
    font-weight: bold;
    color: #007BFF;
    font-size: 13px;
    padding: 0 4px;
}

.class-options {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px 12px;
    box-sizing: border-box;
}

label.class-option {
    font-size: 12px;
    color: #333;
    cursor: pointer;
    display: block;
    align-items: center;
    line-height: 1.3;
}

label.class-option input {
    margin-right: 4px;
}

/* Responsive grid in forms */
.responsive-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

.responsive-form .form-group {
    display: flex;
    flex-direction: column;
}

.responsive-form .form-group textarea,
.responsive-form .form-group input,
.responsive-form .form-group select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Full width */
.responsive-form .form-group.full-width {
    grid-column: 1 / -1;
}

/* Mobile view */
@media (max-width: 768px) {
    .responsive-form .form-grid {
        grid-template-columns: 1fr; /* single column */
    }

/* Images */
.image-item {
    position: relative;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 4px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}

.image-item:hover .image-caption {
    opacity: 1;
}


}
