/* Claim Detail Page Styles */

/* Main Container */
.claim-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Claim Header Section */
.claim-header {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
}

.claim-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.vote-score-large {
    font-size: 20px;
    font-weight: bold;
    margin: 5px 0;
}

.claim-main {
    flex: 1;
}

.claim-title {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.claim-meta {
    font-size: 12px;
    color: #828282;
    margin-bottom: 15px;
}

.claim-meta span {
    margin-right: 10px;
}

.claim-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Tag Section */
.tag-section {
    margin-bottom: 15px;
}

.tag-section h3 {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.tags-with-votes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.vote-btn-small {
    padding: 0 4px;
    font-size: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #828282;
}

.vote-btn-small:hover {
    color: #ff6600;
}

.vote-btn-small.voted {
    color: #ff6600;
}

.vote-score-small {
    font-size: 11px;
    color: #828282;
}

.btn-small {
    padding: 2px 8px;
    font-size: 11px;
    background: #f6f6ef;
    border: 1px solid #ddd;
    cursor: pointer;
}

.btn-small:hover {
    background: #e6e6df;
}

/* Evidence Section */
.evidence-section {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.evidence-section h2 {
    position: absolute;
    width: 200px;
    top: 0;
    left: 0;
    font-size: 13px;
    margin: 0;
    padding: 8px 16px;
    background: rgb(81, 81, 81); /* Dark gray color */
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.evidence-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.evidence-column {
    border: 1px solid #e0e0e0;
    padding: 15px;
}

.evidence-header {
    font-size: 14px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.evidence-header.supporting {
    border-color: #059862;
    color: #059862;
}

.evidence-header.opposing {
    border-color: #d93025;
    color: #d93025;
}

.evidence-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f6f6ef;
    margin-bottom: 10px;
}

.evidence-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 30px;
}

.evidence-content {
    flex: 1;
}

/* Updated Evidence Styles with Inline Voting */

/* Evidence Item with inline voting */
.evidence-item-inline {
    padding: 10px;
    background: #f6f6ef;
    margin-bottom: 10px;
    border-radius: 2px;
}

.evidence-title-row {
    margin-bottom: 6px;
}

.evidence-title {
    font-size: 13px;
    color: #000;
    text-decoration: none;
    line-height: 1.4;
}

.evidence-title:hover {
    text-decoration: underline;
}

/* Evidence meta section with inline voting */
.evidence-meta {
    font-size: 11px;
    color: #828282;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.evidence-meta a {
    color: #828282;
    text-decoration: none;
}

.evidence-meta a:hover {
    text-decoration: underline;
    color: #000;
}

.evidence-meta .flag-link:hover {
    color: #d93025;
}

/* Inline voting widget for evidence */
.vote-widget-evidence-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.vote-widget-evidence-inline .vote-link,
.vote-widget-evidence-inline .vote-link-disabled {
    color: #828282;
    text-decoration: none;
    font-size: 11px;
}

.vote-widget-evidence-inline .vote-link:hover {
    text-decoration: underline;
    color: #000;
}

.vote-widget-evidence-inline .vote-link.voted {
    color: #ff6600;
    font-weight: bold;
}

.vote-widget-evidence-inline .vote-link-disabled {
    color: #ccc;
    cursor: default;
}

.vote-widget-evidence-inline .vote-score-text {
    color: #000;
    font-weight: normal;
    margin: 0 2px;
    font-size: 11px;
}

/* Remove old evidence-vote column styles when using inline voting */
.evidence-item-inline .evidence-vote {
    display: none;
}

/* Evidence columns remain the same */
.evidence-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.evidence-column {
    border: 1px solid #e0e0e0;
    padding: 15px;
}

.evidence-header {
    font-size: 14px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.evidence-header.supporting {
    border-color: #059862;
    color: #059862;
}

.evidence-header.opposing {
    border-color: #d93025;
    color: #d93025;
}

.no-evidence {
    color: #828282;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .evidence-columns {
        grid-template-columns: 1fr;
    }
    
    .evidence-meta {
        font-size: 10px;
    }
    
    .vote-widget-evidence-inline {
        font-size: 10px;
    }
}

/* Used As Evidence Section */
.used-as-evidence {
    font-size: 12px;
    color: #828282;
    margin: 15px 0;
    padding: 8px 12px;
    background: #f6f6ef;
    border-left: 2px solid #ff6600;
}

.evidence-indicator {
    font-weight: 600;
    margin-right: 5px;
}

.evidence-citation {
    display: inline;
}

.evidence-citation-link {
    color: #000;
    text-decoration: none;
}

.evidence-citation-link:hover {
    text-decoration: underline;
}

.evidence-type-indicator {
    font-size: 11px;
    font-style: italic;
}

.evidence-type-indicator.supports {
    color: #059862;
}

.evidence-type-indicator.opposes {
    color: #d93025;
}

/* Comments Section */
.comments-section {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    position: relative;
}

.comments-section h2 {
    position: absolute;
    width: 200px;
    top: 0;
    left: 0;
    font-size: 13px;
    margin: 0;
    padding: 8px 16px;
    background: rgb(81, 81, 81); /* Dark gray color */
    color: white;
    letter-spacing: 0.5px;
}

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

.comment-form textarea {
    width: 100%;
    margin-bottom: 10px;
}

.comments-list {
    margin-top: 20px;
}

/* Individual Comment Styles (from partials/comments.html) */
.comment {
    margin-bottom: 15px;
    padding: 10px;
    background: #f6f6ef;
    border-left: 2px solid #ddd;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #828282;
    margin-bottom: 8px;
}

.comment-vote {
    display: flex;
    align-items: center;
    gap: 2px;
}

.comment-author a {
    color: #828282;
    text-decoration: none;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-content {
    font-size: 13px;
    line-height: 1.5;
}

.reply-btn,
.flag-link {
    background: none;
    border: none;
    color: #828282;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    text-decoration: none;
    padding: 0;
}

.reply-btn:hover {
    color: #ff6600;
    text-decoration: underline;
}

.flag-link:hover {
    color: #d93025;
    text-decoration: underline;
}

.flag-link.flagged {
    color: #999;
    cursor: default;
}

.flag-link.flagged:hover {
    color: #999;
    text-decoration: none;
}

.action-separator {
    color: #828282;
    margin: 0 5px;
}

.reply-form {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
}

.no-comments {
    color: #828282;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .evidence-columns {
        grid-template-columns: 1fr;
    }
    
    /* Keep header horizontal but make it more compact */
    .claim-header {
        gap: 10px; 
        padding: 15px; 
    }
    
    .claim-vote-section {
        min-width: 45px;
        flex-shrink: 0;
    }
    
    .claim-main {
        min-width: 0;
    }
    
    .claim-title {
        font-size: 18px;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .vote-score-large {
        font-size: 16px;
    }
}

/* Evidence Detail Page - Text-based Voting Styles */

/* Make the relationship header consistent with claim header */
.evidence-relationship-header {
    display: flex;
    gap: 20px;
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
}

/* Voting section - matches claim-vote-section style */
.relationship-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

/* Ensure text voting widget works in vertical layout */
.relationship-vote-section .vote-widget-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.relationship-vote-section .vote-link,
.relationship-vote-section .vote-link-disabled {
    color: #828282;
    text-decoration: none;
    font-size: 12px;
}

.relationship-vote-section .vote-link:hover {
    text-decoration: underline;
    color: #000;
}

.relationship-vote-section .vote-link.voted {
    color: #ff6600;
    font-weight: bold;
}

.relationship-vote-section .vote-link-disabled {
    color: #ccc;
    cursor: default;
}

.relationship-vote-section .vote-score-text {
    color: #000;
    font-size: 14px;
    font-weight: bold;
    margin: 2px 0;
}

/* Rest of the relationship info section */
.relationship-info {
    flex: 1;
}

.relationship-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    font-weight: normal;
}

.supporting-text {
    color: #059862;
    font-weight: bold;
}

.opposing-text {
    color: #d93025;
    font-weight: bold;
}

.relationship-meta {
    font-size: 12px;
    color: #828282;
    margin-bottom: 12px;
}

.relationship-meta span {
    margin-right: 10px;
}

.relationship-meta a {
    color: #828282;
    text-decoration: none;
}

.relationship-meta a:hover {
    text-decoration: underline;
}

.relationship-meta .flag-link:hover {
    color: #d93025;
}

.relationship-explanation {
    background: #f6f6ef;
    padding: 12px;
    border-left: 3px solid #ff6600;
    font-size: 13px;
    line-height: 1.5;
}

.relationship-explanation p {
    margin: 0;
}

.relationship-explanation strong {
    font-weight: 600;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .evidence-relationship-header {
        gap: 10px;
        padding: 15px;
    }
    
    .relationship-vote-section {
        min-width: 45px;
        flex-shrink: 0;
    }
    
    .relationship-vote-section .vote-score-text {
        font-size: 12px;
    }
    
    .relationship-title {
        font-size: 18px;
        line-height: 1.3;
    }
}

.tag-autocomplete-wrapper {
    position: relative;
    flex: 1;
}

.tag-suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tag-form-inline {
    background: #f6f6ef;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 10px;
}

.tag-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-input-autocomplete {
    width: 100%;
}

/* Claim Header Wrapper - Contains claim header and virtues sidebar */
.claim-header-wrapper {
    position: relative;
}

/* Desktop: Claim header with virtues sidebar */
@media (min-width: 769px) {
    .claim-header {
        display: flex;
        gap: 20px;
        background: white;
        border: 1px solid #ddd;
        padding: 20px;
        margin-bottom: 20px;
        /* Make room for sidebar */
        padding-right: 180px;
        position: relative;
    }
    
    /* Virtues Sidebar - Desktop only */
    .virtues-sidebar {
        position: absolute;
        right: 20px;
        top: 20px;
        width: 160px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    /* Hide mobile virtues on desktop */
    .virtues-mobile {
        display: none;
    }
}

/* Mobile: Standard layout without sidebar */
@media (max-width: 768px) {
    .claim-header {
        display: flex;
        gap: 10px;
        background: white;
        border: 1px solid #ddd;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Hide desktop sidebar on mobile */
    .virtues-sidebar {
        display: none;
    }
    
    /* Show mobile virtues section */
    .virtues-mobile {
        display: block;
        margin-top: 15px;
    }
    
    .virtues-mobile .virtues-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Virtue Tag Style - Matches field tag appearance but not clickable */
.virtue-vote-wrapper {
    display: block;
    width: 100%;
}

.virtue-with-voting {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 3px;
    padding: 0;
    width: 100%;
}

.virtue-label {
    padding: 4px 4px;
    font-size: 11px;
    color: #333;
    background-color: transparent;
    border-radius: 3px 0 0 3px;
    cursor: help;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1; /* Allow label to take remaining space */
    min-width: 0; /* Allow text to shrink if needed */
}

.virtue-vote-count {
    margin-left: 4px;
    color: #666;
    font-weight: normal;
}

.virtue-vote-buttons {
    display: inline-flex;
    align-items: center;
    border-left: 1px solid #e1bee7; /* Matches border color */
    padding: 0 6px;
    font-size: 10px;
    color: #ccc; /* Separator slash color */
    flex-shrink: 0;
    background-color: rgba(255,255,255,0.3);
}

.virtue-vote-link {
    background: none;
    border: none;
    color: #828282;
    cursor: pointer;
    font-size: 10px;
    padding: 4px 2px;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.virtue-vote-link:hover {
    text-decoration: underline;
    color: #000;
}

.virtue-vote-link.voted {
    color: #ff6600;
    font-weight: bold;
}

/* HTMX loading state */
.virtue-vote-wrapper.htmx-request {
    opacity: 0.6;
}

/* Action links in claim meta */
.action-link {
    color: #828282;
    text-decoration: none;
}

.action-link:hover {
    text-decoration: underline;
}

/* Specific hover colors for different actions */
.delete-link:hover {
    color: #d93025;
}

.flag-link:hover {
    color: #d93025;
}