


/* Messages */


.messages {
    margin-bottom: 20px;
}
.messages .alert {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.messages .alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.messages .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.messages .alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}
.messages .alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}




/* Buttons */


.btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #007bff;
    margin-bottom: 20px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.5;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: white;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    color: #545b62;
    border-color: #545b62;
}




/* Back to top button - hidden on desktop, shown on mobile */


.explore-btn {
    display: none;
}

.back-to-top-container {
    display: none;  /* Hidden by default */
    margin-bottom: 15px;
}

.back-to-top-btn {
    display: none;  /* Hidden by default */
    background-color: #28a745;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-color: #28a745;
    text-decoration: none;  /* Remove underline from link */
}

.back-to-top-btn:hover {
    background-color: #218838;
    border-color: #218838;
}




/* Links */


.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
}

.back-link:hover {
    color: #333;
}

.auth-links {
    text-align: right;
    margin-bottom: 20px;
}




/* Containers */


.actions-container {
    margin-top: 0px;
    padding-top: 0px;
    display: flex;
    flex-direction: column;
}

.actions-container .btn {
    margin-bottom: 10px;
    align-self: flex-end;
}

.subscribe-message {
    margin-top: 0px;
    padding-top: 0px;
}




/* Forum Stats */


.stats-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-label {
    font-weight: 600;
    color: #333;
}

.stats-value {
    font-weight: 600;
    color: #666;
}





/* Settings */


.settings-section {
    margin-bottom: 0px;
}

.settings-section h3 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}

#rate-limit-status {
    font-weight: 600;
    color: #333;
}




/* Page size controls */


.page-size-controls-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.size-link-sidebar {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    font-size: 0.9em;
}

.size-link-sidebar:hover {
    background-color: #e9ecef;
    color: #333;
}

.size-link-sidebar:visited {
    background-color: #f8f9fa;
    color: #666;
}

.size-link-sidebar.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}




/* Button Container */


.button-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
    width: fit-content;
}

.button-container .btn {
    margin-bottom: 0;
}




/* Topics Container */


.topics-container {
    margin: 20px 0;
}

.topics-list {
    margin-top: 10px;
}

.topic-item {
    margin: 5px 0;
}

.topic-item h4 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}




/* Recent Posts Container */


.recent-posts-container {
    margin-top: 30px;
}

.recent-posts-container h2 {
    margin-bottom: 20px;
}




/* Form Styles */


.text-entry {
    margin-bottom: 20px;
}

.text-entry-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 20px;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
}




/* Form-specific input styles */


#id_content {
    font-size: 18px !important;
    padding: 12px !important;
    height: auto !important;
}

#id_title {
    font-size: 18px !important;
    padding: 12px !important;
    height: auto !important;
}




/* Form Messages */


.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}

.help-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.form-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Context Section */
.context-section {
    margin-bottom: 30px;
}

.context-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}




/* Debug Info */


.debug-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    font-family: monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
}




/* Button States */


.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}




/* Item Display Styles */


.item-meta {
    margin-bottom: 30px;
    color: #666;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.item-content-wrapper {
    flex: 1;
}

.item.selected .item-content-wrapper {
    background-color: #f0f0f0;
}

.item-date {
    color: #999;
    font-size: 0.8em;
}

.item-id {
    color: #999;
    font-size: 0.8em;
    margin-right: 2px;
    font-weight: 500;
}

.item-author {
    font-weight: 600;
    color: #333;
}

.item-title {
    margin-top: 10px;
    font-weight: 600;
    font-style: italic;
    color: #333;
}

.item-content {
    white-space: pre-line;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
}

.item {
    position: relative;
    padding-left: 20px;
    padding-right: 20px;
    border-right: 2px solid transparent;
}

.item:hover {
    border-right-color: black;
}

/* Item Actions */
.item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-parent {
    color: #666;
    text-decoration: none;
    font-size: 1.2em;
}

.btn-parent:hover {
    color: #333;
}




/* Reply Badge and Dropdown */


.reply-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8em;
    cursor: pointer;
    margin-left: 8px;
    position: relative;
    display: inline-block;
}

.reply-badge:hover {
    background-color: #218838;
}

.reply-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 250px;
    max-width: 350px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.reply-dropdown.show {
    display: block;
}

.reply-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-item:hover {
    background-color: #f8f9fa;
}

.reply-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.reply-preview {
    color: #666;
    font-size: 0.85em;
    margin-top: 2px;
}




/* Item List Specific Styles */


.item-actions {
    margin-left: 20px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.item-checkbox {
    position: absolute;
    left: -10px;
    top: 0.2em;
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #666;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}

.item-checkbox:checked {
    background: #666;
    border-color: #666;
}

.item-checkbox:hover {
    border-color: #333;
}

.item-checkbox:checked:hover {
    background: #333;
    border-color: #333;
}




/* Reply Button */


.btn-reply {
    background-color: green;
    color: white;
    padding: 2px 4px;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 0px;
    pointer-events: auto;
}

.btn-reply:hover {
    background-color: darkgreen;
}




/* Pagination Styles */


.pagination {
    margin: 20px 20px;
}

.pagination form {
    display: inline;
    margin: 0;
}




/* Inline buttons used within the content block */


.content-inline-button {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background-color: transparent;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    border: 2px solid #007bff;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.content-inline-button:hover {
    background-color: #bedffd;
}

.content-inline-button:visited {
    background-color: transparent;
    color: #b8d8fa;
}

.content-inline-button:disabled {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    border-color: #6c757d;
}




/* Inline links used within the content block */


.content-inline-link {
    display: inline-block;
    border: none;
    padding: 4px 8px;
    color: #2a7bd2;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    background-color: transparent;
    border-radius: 4px;
}

.content-inline-link:hover {
    background-color: #bedffd;
}

.content-inline-link:visited {
    color: #2a7bd2;
}

.content-inline-link:disabled {
    cursor: not-allowed;
    color: #6c757d;
    opacity: 0.6;
    pointer-events: none;
    background-color: transparent;
}




/* Page Size Controls */


.page-size-controls {
    margin-top: 15px;
    text-align: center;
    padding: 10px 0;
}

.size-link {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 2px;
    background-color: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.size-link:hover {
    background-color: #e9ecef;
    color: #333;
}

.size-link.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}




/* Authentication Pages */


.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    max-width: 400px;
    width: 100%;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.auth-btn:hover {
    background-color: #0056b3;
}

.error-message {
    color: #dc3545;
    margin-bottom: 20px;
}

.register-link {
    text-align: center;
    margin-top: 20px;
}

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

.register-link a:hover {
    text-decoration: underline;
}




/* Subscription Form Styles */


.subscription-form {
    max-width: 500px;
    margin: 0 auto;
}




/* Form Controls (if not already defined) */


.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Form Messages */
.help-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}




/* Subscription Info Box */


.subscribe-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #007bff;
}




/* Button Spacing */


.btn + .btn {
    margin-left: 10px;
}




/* Profile Settings */


.profile-settings .form-group {
    margin-bottom: 30px;
}


.profile-settings label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 18px;
    color: #333;
    line-height: 1.4;
}

.profile-settings input[type="url"] {
    width: 100%;
    padding: 18px 20px;
    font-size: 18px;
    line-height: 1.5;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.profile-settings input[type="url"]:focus {
    outline: none;
    border-color: lightblue;
    background-color: #f8f9fa;
}

.profile-settings input[type="url"]:hover {
    border-color: #adb5bd;
}

.profile-settings input[type="url"]::placeholder {
    color: #6c757d;
    font-size: 16px;
    font-style: italic;
}

.profile-settings .error-message {
    color: #dc3545;
    font-size: 16px;
    margin-top: 10px;
    padding: 12px 16px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-weight: 500;
}



