/* jk.ee — application base styles.
   Extracted verbatim from the legacy index.php inline <style> block (cascade position
   preserved: loaded before css/cute-modern.css, which layers the editorial design on top).
   Only rules whose markup no longer exists were removed (legacy sidebar, slider,
   status/ping/IP blocks, friend icons, unused form_style=1 variant). */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #FAF1F1; /* Soft pink background */
}

.navbar {
    background-color: #FFC0CB; /* Light pink */
    overflow: hidden;
    font-size: 14px; /* Reduced font size */
}

.navbar-left, .navbar-right {
    float: left; /* Align navbar-left to the left */
}

.navbar-right {
    float: right; /* Align navbar-right to the right */
}

.navbar a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 5px 10px; /* Reduced padding */
    text-decoration: none;
}

.navbar a:hover {
    background-color: #FFB6C1; /* Darker pink */
    color: black;
}

.container {

    display: flex;
    flex-direction: row; /* Changed to row for side-by-side layout */
    height: calc(100% - 48px); /* Adjust height */
}

.main {
    display: flex;
    flex-grow: 1;
    overflow: hidden; /* Prevents the whole page from scrolling */
}

.sidebar-right, .main-content {
    padding: 20px;
    background-color: #fff;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

.sidebar-right {
    max-width: 26%;
}

.main-content {
    max-width: 45%; /* Adjust as needed */

    flex-grow: 2;
    font-size: 16px;
    overflow: auto; /* Enables scrolling within the main content */
    max-height: none; /* Remove the maximum height */
}

.blog-post {
    background-color: #FFEBEE; /* Light red */
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    position: relative; /* Needed for absolute positioning of children */
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-title {
    margin: 0;
    flex-grow: 1; /* Allows the title to take up available space */
}

.post-date {
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 5px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px; /* Space between content and footer */
}

.post-stats span {
    margin-right: 10px; /* Space between stats */
}

.post-owner {
    padding: 5px 10px;
    border-radius: 5px;
}

/* Shared styles for Registration and Login forms (form_style=2; the form_style=1
   variant was never enabled and was removed). */
.form-container {
    background-color: #fff; /* White background */
    padding: 20px;
    margin: 20px auto;
    width: 300px; /* Adjust width as needed */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-header h2 {
    margin: 0;
    color: #D16BA5; /* Soft pink color */
    text-align: center;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    text-align: center;
    font-size: 14px;
    margin-bottom: 20px;
}

.form-body label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.form-body input[type="email"], .form-body input[type="password"], .form-body input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
}

.form-submit-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #D16BA5;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.form-submit-button:hover {
    background-color: #C15B9E; /* Slightly darker pink */
}

.form-footer-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Unavailable state (reset password has no backend until mail infra exists) */
.form-unavailable .form-body {
    opacity: 0.45;
    filter: grayscale(0.7);
    pointer-events: none;
    user-select: none;
}

.form-unavailable-note {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 6px;
    background-color: #f5f0f4;
    border: 1px solid #e3d3de;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.form-unavailable-note a {
    color: #D16BA5;
    text-decoration: none;
}

.form-footer-text a {
    color: #D16BA5;
    text-decoration: none;
}

.form-footer-text a:hover {
    text-decoration: underline;
}

/*about page*/

.about-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px; /* Adjust as needed */
}

.about-header h2 {
    color: #D16BA5;
    margin-bottom: 10px;
}

.about-header p {
    color: #666;
    margin-bottom: 20px;
}

.about-body p, .about-body h3 {
    color: #333;
    margin-bottom: 15px;
}

.about-body h3 {
    color: #D16BA5;
    margin-top: 20px;
}

.about-footer {
    text-align: center;
    margin-top: 20px;
}

.about-footer a {
    color: #D16BA5;
    text-decoration: none;
}

.about-footer a:hover {
    text-decoration: underline;
}

.contact-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px; /* Adjust as needed */
}

.contact-header h2 {
    color: #D16BA5;
    margin-bottom: 10px;
}

.contact-header p {
    color: #666;
    margin-bottom: 20px;
}

.contact-body p, .contact-body h3 {
    color: #333;
    margin-bottom: 15px;
}

.contact-body h3 {
    color: #D16BA5;
    margin-top: 20px;
}

.contact-footer {
    text-align: center;
    margin-top: 20px;
}

.contact-footer a {
    color: #D16BA5;
    text-decoration: none;
}

.contact-footer a:hover {
    text-decoration: underline;
}

.comment-section {
    background-color: #FFEBEE; /* Light red */
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.comment-form h4,
.comments-display h4 {
    color: #D16BA5; /* Soft pink */
    margin-bottom: 10px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.input-field {
    flex: 1; /* Each input takes equal width */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
}

.textarea-field {
    width: 97%;
    height: 100px; /* Adjust as needed */
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    background-color: #fff;
    color: #333;
    margin-bottom: 10px;
}

.submit-comment-btn {
    background-color: #D16BA5;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: block; /* Make the button take the full width */
    width: 100%;
}

.submit-comment-btn:hover {
    background-color: #C15B9E; /* Slightly darker pink */
}

.comment {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #FFF0F5; /* Lighter red */
    border-radius: 4px;
}

.reply-comment {
    margin-left: 20px;
    border-left: 2px solid #D16BA5; /* Soft pink */
    padding: 10px;
    background-color: #FFEBEE; /* Different background for reply */
}

.comments-display .comment {
    margin-top: 10px;
    padding: 10px;
    background-color: #FFF0F5; /* Lighter red */
    border-radius: 4px;
}

.comment-author-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-link {
    color: #D16BA5; /* Soft pink */
    cursor: pointer;
    text-decoration: none;
}

.reply-link:hover {
    text-decoration: underline;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.comment-content {
    color: #333;
}

.main-content img {
    max-width: 100%;
    height: auto;
}

.blog-post {
    word-wrap: break-word;
}

.comment-section {
    word-wrap: break-word;
}

pre {
    background: #fff;
    color: #000;
    white-space: pre-wrap; /* Wraps text and preserves white spaces and line breaks */
    word-wrap: break-word; /* Breaks long words to prevent horizontal scrolling */
    overflow-x: auto; /* Adds horizontal scrollbar if needed */
    max-width: 100%; /* Ensures the element doesn't exceed the width of its parent */
    padding: 10px; /* Optional: adds some space inside the pre element */
    border-radius: 5px; /* Optional: rounds the corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: adds a subtle shadow */
}

.imgModal-container {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.imgModal-content {
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
}

.imgModal-content img {
    width: 100%;
    height: auto;
}

.imgModal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Popup alert */
.warning-popup h3 {
    margin: 0;
}

.warning-popup p {
    margin: 1px 0px 0px 0px;
}

.warning-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 150px;
    max-width: 400px;
    background-color: #ff9999; /* Red background color */
    color: #fff; /* White text color */
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default */
    transition: opacity 0.3s ease-in-out; /* Smooth transition */
}

.warning-popup.show {
    display: block; /* Show when the 'show' class is added */
    opacity: 1; /* Show with fade-in effect */
}

.warning-content {
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

.progress-bar {
    margin: 4px 0px 0px 0px;
    height: 3px;
    width: 100%;
    background-color: #fff;
    position: relative;
    bottom: 0;
    left: 0;
    border-radius: 0 0 5px 5px;
    /* The animation-duration is set inline from the validated ?s parameter. */
}

.profile-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.profile-header p {
    color: #666;
    margin-bottom: 20px;
}

.profile-body .user-details, .user-posts {
    margin-bottom: 20px;
}

.user-details h3, .user-posts h3 {
    color: #333;
    margin-bottom: 10px;
}

.profile-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.alerts-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.alerts-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.alerts-header p {
    color: #666;
    margin-bottom: 20px;
}

.alerts-list {
    list-style-type: none;
    padding: 0;
}

.alert-item {
    background-color: #f2f2f2;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.new-post-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.new-post-form-container h2, .drafts-container h2 {
    color: #333;
    margin-bottom: 10px;
}

#newPostForm label {
    display: block;
    margin-bottom: 5px;
}

#newPostForm input[type="text"], #newPostForm textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.draft-item {
    background-color: #f2f2f2;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes progressBar {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Popup alert */
@media (max-width: 767px) {
    .main {
        flex-direction: column; /* Display sections one by one */
    }

    .main-content,
    .sidebar-right {
        margin: 10px; /* Add space between sections */
    }

    .main-content {
        max-width: 100%;
        overflow-y: auto; /* Enables scrolling within the main content */
        height: 500px; /* Set a fixed height or adjust as needed */
    }

    .container {
        height: auto; /* Adjust height for mobile */
    }

    .form-body {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column; /* Stack the inputs vertically */
    }

    .input-field {
        flex-grow: 0; /* Prevent inputs from growing */
        width: 100%; /* Full width on mobile */
    }

    /*about*/
    .about-container {
        padding: 10px;

    }

    .contact-container {
        padding: 10px;
    }

    .sidebar-right {
        max-width: 95%;
    }
}

/* New Content Container (post editor) */
.editor-container {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.editor-toolbar {
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.toolbar-btn {
    padding: 5px 10px;
    margin-right: 5px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
    cursor: pointer;
}

.toolbar-btn:hover {
    background: #e9e9e9;
}

.editor-content {
    position: relative;
}

.editor-area {
    min-height: 300px;
    padding: 15px;
    background: white;
    overflow-y: auto;
}

.preview-area {
    min-height: 300px;
    padding: 15px;
    background: white;
    overflow-y: auto;
}

.editor-area:focus {
    outline: none;
}
