/* static/css/discussion.css */

/* Global box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5e6d3;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow-y: auto;
}

.discussion-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    max-height: 100vh;
    overflow-y: auto;
    padding-bottom: 20px;
}

header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.back-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 20px;
}

h1 {
    color: #8B4513;
}

.post-form {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.post-form input,
.post-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.post-form textarea {
    height: 100px;
}

#submit-post {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
}

.auth-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.hidden {
    display: none;
}

.post {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    overflow: hidden; /* Add this to contain the image */
}

.post-image {
    max-width: 100%;
    height: auto;
    display: block; /* This ensures the image doesn't have extra space below */
    margin: 10px 0; /* Add some vertical margin */
    border-radius: 5px; /* Optional: if you want rounded corners */
    object-fit: contain;

}

.post-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

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

.post-actions button {
    background-color: #f0f0f0;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.comment-form {
    display: flex;
    margin-top: 10px;
    position: relative;
}

.comment-form input {
    flex: 1;
    padding: 5px;
    margin-right: 5px;
}

.comment-form button {
    flex-shrink: 0;
    width: auto;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .discussion-container {
        padding: 10px;
    }

    .post-form input,
    .post-form textarea {
        font-size: 14px;
    }

    .post {
        padding: 10px;
    }

    .post-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .post-header .avatar {
        margin-bottom: 0;
    }

    .post-actions button,
    .comment-form button {
        padding: 5px;
        font-size: 14px;
    }
}






nav {
    display: flex;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    background-color: #f0f0f0;
    color: #333; /* Dark text color for better visibility */
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
    margin-right: 5px;
}

.tab-button:hover {
    background-color: #ddd;
    color: #000;
}


.tab-button.active {
    background-color: #4CAF50;
    color: white;
}

/* Ensure active tab stays visible when hovered */
.tab-button.active:hover {
    background-color: #45a049; /* Slightly darker green on hover */
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.festival-item {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.festival-item h3 {
    margin-top: 0;
    color: #4CAF50;
}

.festival-item ul {
    padding-left: 20px;
    margin-bottom: 0;
}

#load-more-festivals {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

#load-more-festivals.hidden {
    display: none;
}


.simple-url-preview {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.simple-url-preview a {
    display: flex;
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

.simple-url-preview .preview-icon {
    font-size: 24px;
    margin-right: 10px;
}

.simple-url-preview .preview-content {
    display: flex;
    flex-direction: column;
}

.simple-url-preview .preview-domain {
    font-weight: bold;
}

.simple-url-preview .preview-url {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}