/**
 * WebWitch QA System Styles - GitHub Dark Theme
 * NO EMOTICONS - Bootstrap Icons Only
 * Follows project STYLEGUIDE.md requirements
 */

:root {
    /* GitHub Dark Theme Colors */
    --gh-bg-primary: #0d1117;
    --gh-bg-secondary: #161b22;
    --gh-bg-tertiary: #21262d;
    --gh-border: #30363d;
    --gh-text-primary: #c9d1d9;
    --gh-text-secondary: #8b949e;
    --gh-link: #58a6ff;
    --gh-success: #238636;
    --gh-danger: #da3633;
    --gh-warning: #9e6a03;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gh-bg-primary);
    color: var(--gh-text-primary);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: var(--gh-bg-secondary);
    border-bottom: 1px solid var(--gh-border);
    color: var(--gh-text-primary);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gh-text-primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gh-text-secondary);
    font-size: 14px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gh-text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--gh-success);
    color: white;
    border-color: var(--gh-success);
}

.btn-primary:hover {
    background: #2ea043;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--gh-text-primary);
    border-color: var(--gh-border);
}

.btn-secondary:hover {
    background: var(--gh-bg-tertiary);
    border-color: var(--gh-text-secondary);
    color: var(--gh-text-primary);
}

.btn-small {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-success {
    background: var(--gh-success);
    color: white;
}

.btn-warning {
    background: var(--gh-warning);
    color: white;
}

.btn-danger {
    background: var(--gh-danger);
    color: white;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(218, 54, 51, 0.1);
    border-color: var(--gh-danger);
    color: #f85149;
}

.alert-success {
    background: rgba(35, 134, 54, 0.1);
    border-color: var(--gh-success);
    color: #3fb950;
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--gh-link);
    color: var(--gh-link);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--gh-text-primary);
}

.empty-state p {
    color: var(--gh-text-secondary);
    margin-bottom: 24px;
}

/* Sessions Grid */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

/* Session Card */
.session-card {
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    padding: 16px;
    transition: border-color 0.2s;
}

.session-card:hover {
    border-color: var(--gh-text-secondary);
}

.session-card.status-draft {
    border-left: 3px solid var(--gh-text-secondary);
}

.session-card.status-submitted {
    border-left: 3px solid var(--gh-link);
}

.session-card.status-published {
    border-left: 3px solid var(--gh-success);
}

.session-card.status-archived {
    border-left: 3px solid var(--gh-border);
    opacity: 0.6;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.session-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gh-text-primary);
    flex: 1;
    margin-right: 12px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-draft {
    background: rgba(139, 148, 158, 0.2);
    color: var(--gh-text-secondary);
}

.badge-submitted {
    background: rgba(88, 166, 255, 0.2);
    color: var(--gh-link);
}

.badge-published {
    background: rgba(35, 134, 54, 0.2);
    color: var(--gh-success);
}

.badge-archived {
    background: rgba(48, 54, 61, 0.2);
    color: var(--gh-border);
}

.badge-answered {
    background: rgba(35, 134, 54, 0.2);
    color: var(--gh-success);
}

.badge-unanswered {
    background: rgba(139, 148, 158, 0.2);
    color: var(--gh-text-secondary);
}

.badge-skipped {
    background: rgba(158, 106, 3, 0.2);
    color: var(--gh-warning);
}

/* Session Meta */
.session-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--gh-bg-tertiary);
    border-radius: 6px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.meta-item .label {
    color: var(--gh-text-secondary);
}

.meta-item .value {
    font-weight: 600;
    color: var(--gh-text-primary);
}

/* Session Actions */
.session-actions {
    display: flex;
    gap: 8px;
}

/* Question List */
.questions-list {
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    padding: 24px;
}

.question-item {
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--gh-bg-tertiary);
}

.question-item:last-child {
    margin-bottom: 0;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.question-number {
    background: var(--gh-link);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.question-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--gh-text-primary);
    margin-bottom: 12px;
}

.options-list {
    list-style: none;
    margin: 12px 0;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    background: var(--gh-bg-secondary);
    transition: all 0.2s;
}

.option-item:hover {
    border-color: var(--gh-link);
}

/* User's selection: outline only (no fill) */
.option-item.selected {
    border-color: var(--gh-success);
    border-width: 2px;
    background: var(--gh-bg-secondary);  /* No fill, same as default */
}

/* Agent's suggestion: keeps fill color even when user selects different option */
.option-item.suggested {
    border-color: var(--gh-warning);
    background: rgba(158, 106, 3, 0.1);
}

/* When user selects the suggested option, show both styles */
.option-item.selected.suggested {
    border-color: var(--gh-success);
    border-width: 2px;
    background: rgba(158, 106, 3, 0.1);  /* Keep suggested fill */
}

.option-letter {
    font-weight: 700;
    color: var(--gh-link);
    margin-right: 12px;
    min-width: 24px;
}

.option-text {
    flex: 1;
    color: var(--gh-text-primary);
}
.option-content {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex: 1;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.suggestion-note {
    background: rgba(158, 106, 3, 0.1);
    border-left: 3px solid var(--gh-warning);
    padding: 12px;
    margin: 12px 0;
    font-size: 14px;
    color: var(--gh-text-primary);
}

.user-notes {
    margin-top: 12px;
}

.user-notes label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gh-text-primary);
}

.user-notes textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    color: var(--gh-text-primary);
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.user-notes textarea:focus {
    outline: none;
    border-color: var(--gh-link);
}

/* API Documentation */
.api-docs {
    background: var(--gh-bg-secondary);
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    padding: 24px;
}

.api-docs h2 {
    margin-bottom: 24px;
    color: var(--gh-text-primary);
}

.api-docs h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--gh-text-primary);
    font-size: 18px;
}

.api-docs h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: var(--gh-text-primary);
    font-size: 15px;
}

.endpoint {
    border: 1px solid var(--gh-border);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--gh-bg-tertiary);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.http-method {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}

.http-method.post {
    background: var(--gh-success);
    color: white;
}

.http-method.get {
    background: var(--gh-link);
    color: white;
}

.endpoint-path {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--gh-link);
}

code {
    background: var(--gh-bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #f97583;
}

pre {
    background: var(--gh-bg-tertiary);
    border: 1px solid var(--gh-border);
    color: var(--gh-text-primary);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .sessions-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 12px;
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .container {
        padding: 0 16px;
    }
}
