/* Discussion Board Styles */
#discussion-board {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.discussion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e5e9;
}

.discussion-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #95a5a6;
}

.close:hover {
    color: #2c3e50;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Add or update for better select display */
.form-group select {
    height: 44px;
    padding: 10px 12px;
    font-size: 1rem;
    line-height: 1.4;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%237f8c8d" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px 18px;
}

/* For better cross-browser consistency */
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Subjects */
.subjects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.subject-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    color: #fff;
}

.subject-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.subject-item h4 {
    margin: 0 0 0.5rem 0;
    color: #fff !important;
}

.subject-item p {
    margin: 0 0 1rem 0;
    color: #fff !important;
    line-height: 1.5;
}

.subject-item .btn {
    background: #fff;
    color: #222e3c;
    border: none;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
}

.subject-item .btn:hover {
    background: #f6e58d;
    color: #222e3c;
}

/* Threads */
.threads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e5e9;
}

.threads-header h3 {
    margin: 0;
    color: #2c3e50;
}

.thread-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.thread-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.thread-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    cursor: pointer;
}

.thread-title:hover {
    color: #3498db;
}

.thread-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.thread-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-nickname {
    font-weight: 500;
}

.author-role {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.thread-content {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.thread-actions {
    display: flex;
    gap: 0.5rem;
}

/* Thread Detail */
.thread-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e5e9;
}

.thread-detail-header h3 {
    margin: 0;
    color: #2c3e50;
}

.thread-detail-content {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.thread-detail-content[data-thread-id] {
    cursor: default;
}

.thread-detail-title {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.thread-detail-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.thread-detail-meta .thread-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.thread-detail-meta .thread-date {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.thread-detail-meta .thread-actions {
    display: flex;
    gap: 0.5rem;
}

.thread-detail-content .thread-content {
    color: #2c3e50;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

/* Replies */
.replies-section-title {
    margin: 2rem 0 1rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid #e1e5e9;
    padding-bottom: 0.5rem;
}

.reply-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-date {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.reply-content {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

/* Form containers */
.form-container {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.form-container h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

/* Role colors */
.role-paramedic { background-color: #ff6b6b; }
.role-emt { background-color: #4ecdc4; }
.role-eca { background-color: #45b7d1; }
.role-student-paramedic { background-color: #96ceb4; }
.role-student-emt { background-color: #feca57; }
.role-student-eca { background-color: #ff9ff3; }
.role-first-aid { background-color: #54a0ff; }
.role-frec-3 { background-color: #5f27cd; }
.role-frec-4 { background-color: #00d2d3; }
.role-other-student-hcp { background-color: #ff9f43; }
.role-other-hcp { background-color: #10ac84; }

/* Responsive */
@media (max-width: 768px) {
    .discussion-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .threads-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .thread-detail-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .subjects-list {
        grid-template-columns: 1fr;
    }
    
    .thread-header,
    .thread-detail-meta,
    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Voting Controls */
.vote-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.vote-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
    color: #888;
}
.vote-btn[data-voted="1"], .vote-btn.vote-up[data-voted="1"] {
    color: #27ae60;
    font-weight: bold;
}
.vote-btn[data-voted="-1"], .vote-btn.vote-down[data-voted="-1"] {
    color: #e74c3c;
    font-weight: bold;
}
.vote-btn:hover {
    color: #3498db;
}
.vote-count {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
    color: #2c3e50;
}

/* Mention */
.mention {
    background: #f6e58d;
    color: #2d3436;
    border-radius: 4px;
    padding: 0 4px;
    font-weight: 600;
    cursor: pointer;
}

#discussion-notification-bell {
    z-index: 999999 !important;
}
#notif-dropdown {
    display: none;
    position: fixed !important;
    top: 50% !important;
    right: 80px !important;
    transform: translateY(-50%);
    background: #fff;
    min-width: 260px;
    max-width: 350px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    z-index: 999999 !important;
    border: 2px solid #3498db;
}
#notif-dropdown[style*="display: block"] {
    display: flex !important;
    flex-direction: column;
}
#notif-list > div:hover {
    background: #f6e58d;
}

/* Achievement Badge Styles */
.achievement-badge {
    display: inline-block;
    font-size: 1.2em;
    margin-left: 6px;
    cursor: help;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.achievement-badge:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Ensure achievement badges don't interfere with other badges */
.thread-author .achievement-badge,
.reply-author .achievement-badge {
    vertical-align: middle;
    line-height: 1;
}

/* Mobile responsiveness for achievement badges */
@media (max-width: 768px) {
    .achievement-badge {
        font-size: 1.1em;
        margin-left: 4px;
    }
    
    .achievement-badge:hover {
        transform: scale(1.1);
    }
} 