/* --- Ethos & Colours --- */
:root {
    /* I'll use a placeholder green. Replace this with your clydesite-green hex code! */
    --clydesite-green: #578e88; 
    --dark-clydesite-green: #166960; 
    --page-background: #ffffff; /* A very light grey, like old forum backgrounds */
    --content-background: #c6dddb; /* White for the main content box */
    --content-header: #074e48; 
    --text-color: #000000;
    --border-color: #dddddd;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--page-background);
    background-color: var(--clydesite-green);
    margin: 0;
    padding: 20px;
}


.top-menu a, .top-menu strong, .top-menu span {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-family: Arial, sans-serif;
}
.top-menu a:hover {
    text-decoration: underline;
}
.top-menu .menu-group strong {
    font-weight: bold;
}


/* --- Main Layout --- */
/* This is the "midships" container for the whole forum */
.forum-container {
    max-width: 1200px; /* Increased from 900px */
    margin: auto;
    display: flex;
    gap: 20px;
}

.sidebar {
    flex: 0 0 180px; /* The sidebar is a fixed width and won't grow/shrink */
    padding: 15px;
    background-color: var(--content-background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content; /* Makes the box only as tall as its content */
}

.sidebar a {
    display: block;
    padding: 8px;
    text-decoration: none;
    color: var(--clydesite-green);
    font-weight: bold;
    border-radius: 5px;
}

.sidebar a:hover {
    background-color: #e8f5e9; /* A very light green for hover */
}

.main-content {
    flex-grow: 1;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    
    /* --- ADD THESE TWO LINES --- */
    display: flex;
    flex-direction: column;
    min-height: 80vh; /* Make the container at least 80% of the screen height */
}

/* This creates your "rounded at the top banner" */
.main-content h1, .post-header h2 {
    background-color: var(--content-header);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.5em;
}

/* --- Post List (forum_main.html) --- */
.post-list {
    padding: 10px 20px;
}

.post-summary {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.post-summary a {
    text-decoration: none;
    color: #222222;
    font-size: 1.1em;
}

.post-summary a:hover {
    text-decoration: underline;
}

.post-meta {
    font-size: 0.9em;
    color: #666;
    padding-top: 4px;
}

/* --- Post View & Navigation Bar (post_view.html) --- */
.post-header {
    margin-bottom: 10px;
}
.post-header p {
    padding: 0 10px;
    color: #666;
}

.post-body {
    padding: 0 20px 20px 20px;
    line-height: 1.6;
        /* --- THIS IS THE NEW PART --- */
    max-height: 60vh;   /* Max height is 60% of the viewport height */
    overflow-y: auto;   /* Add a vertical scrollbar ONLY if needed */
    flex-grow: 1; /* This tells the post body to fill the available space */
    /* --- END OF NEW PART --- */
}

/* This creates your "clydesite-green moulded bar" */
.navigation-bar {
    margin-top: auto; /* This pushes the bar to the bottom of the container */
    background-color: var(--clydesite-green);
    padding: 7px;
    margin: 10px; /* Give it space from the content */
    border-radius: 10px; /* This rounds the corners */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* This gives the "moulded" feel */
    text-align: center;
}

.navigation-bar .button {
    display: inline-block;
    padding: 8px 8px;
    margin: 4px;
    background-color: white;
    color: var(--clydesite-green);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8em; /* or 12px, for example */
}

.navigation-bar .button.live:hover {
    background-color: #e8f5e9;
}

.navigation-bar .button.disabled {
    background-color: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}

/* --- Reply Form --- */
#reply-form {
    padding: 0 20px 20px 20px;
}

#reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 10px;
}

#reply-form button {
    background-color: var(--clydesite-green);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

#reply-form button:hover {
    opacity: 0.9;
}


/* --- NEW: Live Feed Panel Styles --- */
.live-feed-panel {
    flex: 0 0 250px; /* Give the new panel a fixed width */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px;
    height: fit-content; /* Make it match the height of the sidebar */
}

/* Styles for the content inside the live feed, based on your div */
.live-feed-panel h3 {
    font-size: 1.25rem; /* 20px */
    font-weight: bold;
    margin-bottom: 12px;
    color: #374151; /* gray-700 */
    display: flex;
    align-items: center;
}

.live-feed-panel ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 70vh; /* Control the height and scrolling */
    overflow-y: auto;
}

/* You can customize the scrollbar to be less intrusive */
.live-feed-panel ul::-webkit-scrollbar {
    width: 6px;
}
.live-feed-panel ul::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* --- Logbook & Voyage List Styles --- */
.voyage-list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.voyage-list-item a {
    text-decoration: none;
    color: #0056b3;
    font-size: 1.1em;
    font-weight: bold;
}

.voyage-list-item a:hover {
    text-decoration: underline;
}

.voyage-list-meta {
    font-size: 0.9em;
    color: #666;
    padding-top: 4px;
}

/* --- Recent Pictures Module --- */
.recent-pictures-module {
    background-color: #e8f5e9; /* A very light green */
    padding: 15px;
    margin: 0 0 20px 0;
    border-radius: 8px;
}
.module-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--clydesite-green);
    margin: 0 0 10px 0;
    border-bottom: 2px solid var(--clydesite-green);
    padding-bottom: 5px;
}
.picture-layout {
    display: flex;
    gap: 10px;
}
.main-picture {
    flex: 2; /* Takes up 2/3 of the space */
}
.side-pictures {
    flex: 1; /* Takes up 1/3 of the space */
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.main-picture a, .side-picture-item a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}
.main-picture img, .side-picture-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents images from being stretched */
    display: block;
}
/* Style for the text overlay */
.main-picture span, .side-picture-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 4px;
    font-size: 0.8em;
    text-align: center;
}
/* --- Bot Post Styling --- */
.post-summary.bot-post-info a {
    color: var(--dark-clydesite-green); /* Your dark Clydesite green */
}

.post-summary.bot-post-alert a {
    color: #dc2626; /* A strong red color */
    font-weight: bold;
}

/* --- Toy Room & Dashboard Styles --- */
.toy-box {
    background-color: #f0f8ff; /* A very light, pleasant blue */
    border: 1px solid #d1e2ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.toy-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d1e2ff;
    font-size: 1.2em;
    color: var(--clydesite-green);
}

/* Style for the "coming soon" placeholders */
.placeholder-box {
    border-style: dashed;
    color: #999;
    text-align: center;
    background-color: #f9f9f9;
}

/* A consistent style for the small 'Add' button */
.button-add {
    background-color: #22c55e; /* A nice green */
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
}
.button-add:hover {
    background-color: #16a34a; /* A darker green */
}
