/* Styles for single view page (kept as provided) */
.q-author-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9em;
    color: #64748b;
}
.q-author-meta i {
    font-size: 1.2em;
    color: #1e293b;
}
.q-author-meta .author-info {
    line-height: 1.4;
}
.q-author-meta .author-name {
    font-weight: 600;
    color: #1e293b;
}
.q-content-box {
    padding: 20px 0;
    line-height: 1.6;
    font-size: 1.1em;
    white-space: pre-wrap; /* Preserve line breaks */
}
.q-stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.95em;
    color: #475569;
}
.q-tags {
    margin-top: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

/* Answer Section Styles */
.answers-section h3 {
    margin-top: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f4c81;
}
.answer-card {
    /* Changed to block/default flow, removing flex for overall card */
    display: block; 
    padding: 20px 0;
    border-bottom: 1px solid #f1f5f9;
}

/* --- NEW BUTTON CONTAINER & LAYOUT --- */
.answer-body {
    flex-grow: 1; /* Retained */
}

.answer-interactions {
    display: flex;
    align-items: center;
    gap: 10px; 
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    justify-content: space-between; /* Aligns left group and right meta */
    flex-wrap: wrap; 
}

.interaction-left-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Spacing between Like, Dislike, Accept */
}

/* Adjustment for button content to align count */
.vote-btn span {
    margin-left: 5px; /* Space between icon/text and count */
    font-weight: 700;
}

/* Vote Button Base */
.vote-btn {
    background: none;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #475569; 
    transition: all 0.2s;
}
.vote-btn i {
    font-size: 1.1em;
}
.vote-btn:hover {
    background-color: #f1f5f9;
}

/* Active Like state */
.vote-btn.active-like {
    background-color: #e0f2fe; /* Light blue background */
    border-color: #3b82f6;
    color: #1d4ed8; /* Darker blue text */
}
.vote-btn.active-like:hover {
    background-color: #bfdbfe;
}

/* Active Dislike state */
.vote-btn.active-dislike {
    background-color: #fee2e2; /* Light red background */
    border-color: #dc2626;
    color: #991b1b; /* Darker red text */
}
.vote-btn.active-dislike:hover {
    background-color: #fca5a5;
}

/* Accept/Unaccept Button Styling (Minor adjustments for new layout) */
.accept-btn {
    padding: 8px 12px; /* Uniform padding with vote buttons */
    background-color: #a7f3d0;
    color: #059669;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9em;
    line-height: 1.2;
    display: flex; /* Added for icon alignment */
    align-items: center;
    gap: 5px;
}
.unaccept-btn {
    background-color: #fca5a5;
    color: #991b1b;
}
.accept-btn:hover {
    background-color: #6ee7b7;
}
.unaccept-btn:hover {
    background-color: #ef4444;
}

.answer-meta {
    /* Now part of the flex row, aligned right */
    font-size: 0.9em;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0; /* Remove top margin from the meta block */
}
.answer-meta .author-name {
    font-weight: 600;
    color: #1e293b;
}
.accepted-answer-badge {
    display: inline-flex; /* Changed to inline-flex for better icon alignment */
    align-items: center;
    background-color: #d1fae5;
    color: #059669;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85em;
    gap: 5px;
}
.edit-answer-btn {
    background: none;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.edit-answer-btn:hover {
    background-color: #f1f5f9;
}
/* --- END NEW BUTTON CONTAINER & LAYOUT --- */

/* --- NEW QUESTION STATUS BADGES --- */
.question-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 700;
    /* --- THE FIX --- */
    margin-left: auto; /* <-- This pushes the badge to the right edge */
    /* --- END THE FIX --- */
    gap: 7px;
}
.question-status-badge i {
    font-size: 1em;
}

.badge-status-unanswered {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.badge-status-answered {
    background-color: #e0f2fe;
    color: #3b82f6;
    border: 1px solid #93c5fd;
}

.badge-status-accepted {
    background-color: #d1fae5;
    color: #059669;
    border: 1px solid #6ee7b7;
}
/* --- END NEW QUESTION STATUS BADGES --- */

/* Form Styles */
.answer-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed #cbd5e1;
}
.answer-form h3 {
    margin-bottom: 15px;
    color: #1e293b;
}
.answer-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
}
.answer-form button {
    background-color: #0f4c81;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}
.answer-form button:hover {
    background-color: #0a3a61;
}
.alert-box {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}
.alert-error {
    background-color: #fcebeb;
    color: #cc0000;
    border: 1px solid #cc0000;
}
.alert-success {
    background-color: #f0fff4;
    color: #008000;
    border: 1px solid #008000;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}
.skip-link:focus {
    left: 20px;
    top: 20px;
    background: #000;
    color: #fff;
    padding: 10px 15px;
    z-index: 9999;
}

/* --- Modern Expert Badge Styling --- */

/* Modern Verified Icon Styling */
.expert-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: -8px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: help;
}

.expert-badge-icon img {
    width: 20px;  /* Modern, subtle size */
    height: 20px;
}

/* Pop-out effect on hover */
.expert-badge-icon:hover {
    transform: scale(1.25);
}