/* ========================================
   Mitgliederbereich Styles
   Following patterns from events.css
   ======================================== */

/* ========================================
   Page Layout
   ======================================== */

.mitgliederbereich-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mitglieder-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 30px;
}

.mitglieder-header .page-title {
    font-size: 42px;
    color: #00507d;
    margin-bottom: 10px;
}

.mitglieder-header .page-description {
    font-size: 18px;
    color: #666;
    margin-bottom: 0;
}

/* Header Notification Toggles */
.header-notification-toggles {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.toggles-heading {
    font-size: 14px;
    color: #666;
}

.header-notification-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(119, 182, 56, 0.08);
    border-radius: 25px;
    border: 1px solid rgba(119, 182, 56, 0.2);
}

.header-notification-toggle .toggle-label {
    font-size: 14px;
    color: #555;
}

/* ========================================
   Access Denied
   ======================================== */

.mitglieder-access-denied {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 40px 0;
}

.access-denied-icon {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
}

.mitglieder-access-denied h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 15px;
}

.mitglieder-access-denied p {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
}

/* ========================================
   Login Prompt
   ======================================== */

.mitglieder-login-prompt {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    margin: 40px auto;
    max-width: 500px;
}

.login-prompt-icon {
    font-size: 64px;
    color: var(--color-primary-blue);
    margin-bottom: 20px;
}

.mitglieder-login-prompt h1 {
    font-size: var(--font-size-h2);
    color: var(--color-text-dark);
    margin-bottom: 15px;
}

.mitglieder-login-prompt p {
    font-size: var(--font-size-large);
    color: var(--color-text-medium);
    margin-bottom: 30px;
}

.mitglieder-login-prompt .bagarbeit-login-form-container {
    text-align: left;
}

/* ========================================
   Notice Messages
   ======================================== */

.mitglieder-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mitglieder-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mitglieder-notice i {
    font-size: 20px;
}

/* ========================================
   Events Section (Future-dated posts)
   ======================================== */

.mitglieder-events-section {
    margin-bottom: 50px;
}

.mitglieder-events-section .section-title {
    font-size: 28px;
    color: #00507d;
    margin-bottom: 25px;
}

/* Event Cards - Use same styling as events.css */
.mitglieder-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.mitglieder-post-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.mitglieder-post-card .event-card-image {
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
}

.mitglieder-post-card .event-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mitglieder-post-card:hover .event-card-image img {
    transform: scale(1.05);
}

.mitglieder-post-card .event-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00507d 0%, #77b638 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 48px;
}

.event-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary-green);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badge variants */
.event-card-badge.badge-event {
    background: var(--color-primary-green);
}

.event-card-badge.badge-news {
    background: var(--color-primary-blue);
}

.mitglieder-post-card .event-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mitglieder-post-card .event-card-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.mitglieder-post-card .event-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.mitglieder-post-card .event-card-title a:hover {
    color: #77b638;
}

.mitglieder-post-card .event-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.mitglieder-post-card .event-date i {
    color: #77b638;
}

.mitglieder-post-card .event-time {
    margin-left: 5px;
    padding-left: 8px;
    border-left: 1px solid #ddd;
}

.mitglieder-post-card .event-card-excerpt {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.mitglieder-post-card .event-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.event-card-comments {
    color: #999;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   Toggle Switch
   ======================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #77b638;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 14px;
    color: #666;
}

/* ========================================
   Posts Section
   ======================================== */

.mitglieder-posts-section {
    margin-bottom: 50px;
}

.mitglieder-posts-section .section-title {
    font-size: 28px;
    color: var(--color-primary-blue);
    margin: 0 0 25px 0;
}

.no-posts-message {
    text-align: center;
    color: #666;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ========================================
   Pagination
   ======================================== */

.mitglieder-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #00507d;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.pagination-btn:hover {
    background: #003d5c;
    color: #fff;
}

.pagination-btn.pagination-disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

/* ========================================
   Single Post Template
   ======================================== */

.mitglieder-news-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.mitglieder-breadcrumb {
    margin: 30px 0 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #77b638;
}

.mitglieder-post-header {
    margin-bottom: 30px;
}

.post-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.event-badge {
    background: #77b638;
    color: #fff;
}

.news-badge {
    background: #00507d;
    color: #fff;
}

.mitglieder-post-title {
    font-size: 36px;
    color: #333;
    line-height: 1.3;
    margin-bottom: 15px;
}

.mitglieder-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.mitglieder-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mitglieder-post-meta i {
    color: #77b638;
}

.mitglieder-post-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.mitglieder-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.mitglieder-post-content {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.mitglieder-post-content p {
    margin-bottom: 1.5em;
}

.mitglieder-post-content h2,
.mitglieder-post-content h3,
.mitglieder-post-content h4 {
    color: #00507d;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.mitglieder-post-footer {
    margin-top: 40px;
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* ========================================
   Comments Section
   ======================================== */

.mitglieder-comments-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #00507d;
    margin-bottom: 25px;
}

.comments-title i {
    color: #77b638;
}

.comments-count-badge {
    background: #77b638;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.comments-list {
    margin-bottom: 40px;
}

.no-comments-message {
    text-align: center;
    color: #999;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Single Comment */
.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #e0e0e0;
    transition: border-color 0.3s;
}

.comment-item.own-comment {
    border-left-color: #00507d;
    background: #f0f7ff;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.comment-reply-to {
    font-size: 12px;
    color: var(--color-primary-green);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    padding: 2px 6px;
    background: rgba(119, 182, 56, 0.1);
    border-radius: 3px;
    transition: all 0.2s;
}

.comment-reply-to:hover {
    background: rgba(119, 182, 56, 0.2);
    color: var(--color-primary-green-hover);
}

.comment-reply-to i {
    font-size: 10px;
}

/* Highlighted comment when scrolled to */
.comment-item.comment-highlighted {
    animation: commentHighlight 2s ease;
}

@keyframes commentHighlight {
    0% {
        background-color: rgba(119, 182, 56, 0.3);
        box-shadow: 0 0 0 3px rgba(119, 182, 56, 0.3);
    }
    100% {
        background-color: #f8f9fa;
        box-shadow: none;
    }
}

.comment-reply.comment-highlighted {
    animation: commentHighlightReply 2s ease;
}

@keyframes commentHighlightReply {
    0% {
        background-color: rgba(119, 182, 56, 0.3);
        box-shadow: 0 0 0 3px rgba(119, 182, 56, 0.3);
    }
    100% {
        background-color: var(--color-bg-white);
        box-shadow: none;
    }
}

.comment-actions {
    display: flex;
    gap: 5px;
}

.comment-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.comment-actions button:hover {
    background: #fff;
    color: #77b638;
}

.comment-actions .btn-delete-comment:hover {
    color: #dc3545;
}

.comment-text {
    color: #333;
    line-height: 1.6;
}

/* Comment Edit Form */
.comment-edit-form {
    margin-top: 15px;
}

.edit-comment-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 10px;
}

.edit-comment-textarea:focus {
    border-color: #77b638;
    outline: none;
}

.comment-edit-actions {
    display: flex;
    gap: 10px;
}

/* Comment Form */
.comment-form-wrapper {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.comment-form-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.comment-form-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author-name {
    font-weight: 500;
    color: #333;
}

.comment-form-field textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    transition: border-color 0.3s;
}

.comment-form-field textarea:focus {
    border-color: #77b638;
    outline: none;
}

.comment-form-actions {
    margin-top: 15px;
}

.comment-form-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.comment-form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
}

.comment-form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   Comment Replies
   ======================================== */

.comment-replies {
    margin-left: 63px;
    border-left: 2px solid var(--color-primary-green);
    padding-left: 20px;
}

.comment-replies:empty {
    display: none;
}

.comment-reply {
    background: var(--color-bg-white);
    padding: 15px;
    border-left-color: var(--color-primary-green);
}

.comment-reply .comment-avatar img {
    width: 36px;
    height: 36px;
}

/* Reply Button */
.btn-reply-comment {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-reply-comment:hover {
    background: #fff;
    color: var(--color-primary-green);
}

/* Reply Form */
.comment-reply-form {
    margin-top: 15px;
    padding: 15px;
    background: var(--color-bg-white);
    border-radius: 6px;
    border: 1px solid var(--color-border-light);
}

.reply-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.reply-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.reply-author-name {
    font-weight: 500;
    color: var(--color-text-dark);
    font-size: 14px;
}

.reply-to-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--color-primary-green);
    font-size: 13px;
    margin-left: auto;
    padding-left: 10px;
}

.reply-to-indicator i {
    font-size: 11px;
}

.reply-to-indicator .reply-to-name {
    font-weight: 500;
}

.reply-textarea {
    width: 100%;
    min-height: 70px;
    padding: 12px;
    border: 2px solid var(--color-border-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

.reply-textarea:focus {
    border-color: var(--color-primary-green);
    outline: none;
}

.comment-reply-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 768px) {
    .mitglieder-header .page-title {
        font-size: 32px;
    }

    .header-notification-toggles {
        flex-direction: column;
        gap: 10px;
    }

    .toggles-heading {
        margin-bottom: 5px;
    }

    .header-notification-toggle {
        padding: 8px 16px;
    }

    .header-notification-toggle .toggle-label {
        font-size: 13px;
    }

    .mitglieder-posts-grid,
    .featured-events-grid {
        grid-template-columns: 1fr;
    }

    .mitglieder-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .mitglieder-post-title {
        font-size: 28px;
    }

    .mitglieder-post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .comment-item {
        flex-direction: column;
    }

    .comment-header {
        flex-direction: column;
        gap: 10px;
    }

    .comment-actions {
        align-self: flex-end;
    }

    .comment-replies {
        margin-left: 20px;
        padding-left: 15px;
    }

    .comment-reply-actions {
        flex-direction: column;
    }

    .comment-reply-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mitglieder-header .page-title {
        font-size: 26px;
    }

    .mitglieder-posts-section .section-title {
        font-size: 22px;
    }

    .mitglieder-access-denied,
    .mitglieder-login-prompt {
        padding: 40px 20px;
    }

    .access-denied-icon,
    .login-prompt-icon {
        font-size: 48px;
    }

    .mitglieder-access-denied h1,
    .mitglieder-login-prompt h1 {
        font-size: 24px;
    }

    .mitglieder-post-title {
        font-size: 24px;
    }

    .comments-title {
        font-size: 20px;
    }
}
