/* ===================================================
   ISSUE DETAIL MODAL STYLES
   =================================================== */

/* Modal Container and Backdrop */
.issue-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--space-lg, 1.5rem);
}

.issue-detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.issue-detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Content Container */
.issue-detail-content {
    position: relative;
    background: var(--bg-primary, #1a1a1a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    border-radius: var(--radius-xl, 16px);
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.issue-detail-modal.show .issue-detail-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.issue-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--space-xl, 2rem);
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    gap: var(--space-lg, 1.5rem);
    position: relative;
}

/* Hide any floating stage indicators in header */
.issue-detail-header .stage-indicator,
.issue-detail-header .backlog-indicator,
.issue-detail-header [class*="backlog"],
.issue-detail-header [class*="stage"] {
    display: none !important;
}

.issue-detail-header-left {
    flex: 1;
    min-width: 0;
}

.issue-id-large {
    background: var(--accent-primary, #007acc);
    color: white;
    padding: var(--space-sm, 0.5rem) var(--space-lg, 1.5rem);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Space Grotesk', 'Courier New', monospace;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: var(--space-md, 1rem);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.issue-title-large {
    color: var(--text-primary, #ffffff);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    font-family: var(--font-display, 'Space Grotesk');
    word-break: break-word;
}

.issue-detail-close {
    background: none;
    border: none;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    cursor: pointer;
    padding: var(--space-sm, 0.5rem);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.issue-detail-close:hover {
    background: var(--accent-danger, #dc3545);
    color: white;
    transform: scale(1.1);
}

.issue-detail-close:focus {
    outline: 2px solid var(--accent-primary, #007acc);
    outline-offset: 2px;
}

/* Modal Body */
.issue-detail-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.issue-detail-main {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.issue-detail-sidebar {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
    border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding: var(--space-xl, 2rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl, 2rem);
}

.issue-meta-section h3,
.issue-actions-section h3 {
    color: var(--text-primary, #ffffff);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 var(--space-lg, 1.5rem) 0;
    font-family: var(--font-display, 'Space Grotesk');
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding-bottom: var(--space-sm, 0.5rem);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
    margin-bottom: var(--space-lg, 1.5rem);
    position: relative;
    overflow: visible;
    contain: layout style;
}

.meta-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    font-size: 0.95rem;
    color: var(--text-primary, #ffffff);
    position: relative;
    width: 100%;
}

/* Type Display */
.type-display {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.type-icon {
    font-size: 1.1rem;
}

.type-text {
    font-weight: 500;
}

/* State Display Container - matches stage-display styling */
.state-display {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 100%;
    display: block;
    position: relative;
    overflow: visible;
    min-height: auto;
    text-align: center;
}

.state-display .status-badge {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* Stage Display Container */
.stage-display {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 100%;
    display: block;
    position: relative;
    overflow: visible;
    min-height: auto;
    text-align: center;
}

.stage-display .status-badge {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* Status and Priority Badges */
.status-badge, .priority-badge, .stage-badge {
    padding: var(--space-xs, 0.25rem) var(--space-md, 1rem);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs, 0.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 1. OPEN/ACTIVE STATES (Blue) - New issues, submitted, needs discussion */
.status-badge.open,
.status-badge.submitted,
.status-badge.to-be-discussed,
.status-badge.reopened,
.stage-badge.open,
.stage-badge.submitted,
.stage-badge.to-be-discussed,
.stage-badge.reopened {
    background: rgba(0, 122, 204, 0.2);
    color: var(--accent-primary, #007acc);
    border: 1px solid rgba(0, 122, 204, 0.4);
    font-weight: 600;
}

/* 2. PLANNED/BACKLOG STATES (Light Blue) - Planned work */
.status-badge.backlog,
.status-badge.planned,
.stage-badge.backlog,
.stage-badge.planned {
    background: rgba(52, 152, 219, 0.2);
    color: var(--accent-info, #3498db);
    border: 1px solid rgba(52, 152, 219, 0.4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 3. IN PROGRESS STATES (Orange/Yellow) - Active work */
.status-badge.in-progress,
.stage-badge.in-progress {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-secondary, #ffc107);
    border: 1px solid rgba(255, 193, 7, 0.4);
    font-weight: 600;
}

/* 4. TESTING/REVIEW STATES (Cyan) - Under review or testing */
.status-badge.testing,
.status-badge.review,
.status-badge.verified,
.stage-badge.testing,
.stage-badge.review,
.stage-badge.verified {
    background: rgba(23, 162, 184, 0.2);
    color: var(--accent-info, #17a2b8);
    border: 1px solid rgba(23, 162, 184, 0.4);
    font-weight: 600;
}

/* 5. COMPLETED/FIXED STATES (Green) - Successfully completed */
.status-badge.resolved,
.status-badge.fixed,
.status-badge.finished,
.stage-badge.resolved,
.stage-badge.fixed,
.stage-badge.finished {
    background: rgba(40, 167, 69, 0.2);
    color: var(--accent-tertiary, #28a745);
    border: 1px solid rgba(40, 167, 69, 0.4);
    font-weight: 600;
}

/* 6. REJECTED/CLOSED STATES (Red/Gray) - Won't be done */
.status-badge.wont-fix,
.status-badge.cant-reproduce,
.status-badge.duplicate,
.status-badge.obsolete,
.stage-badge.wont-fix,
.stage-badge.cant-reproduce,
.stage-badge.duplicate,
.stage-badge.obsolete {
    background: rgba(220, 53, 69, 0.2);
    color: var(--accent-danger, #dc3545);
    border: 1px solid rgba(220, 53, 69, 0.4);
    font-weight: 600;
}

/* 7. INCOMPLETE/NEEDS INFO STATES (Gray) - Missing information */
.status-badge.incomplete,
.stage-badge.incomplete {
    background: rgba(108, 117, 125, 0.2);
    color: var(--text-tertiary, #6c757d);
    border: 1px solid rgba(108, 117, 125, 0.4);
    font-weight: 600;
}

.priority-badge.critical {
    background: rgba(220, 53, 69, 0.2);
    color: var(--accent-danger, #dc3545);
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.priority-badge.high {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-secondary, #ffc107);
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.priority-badge.normal {
    background: rgba(108, 117, 125, 0.2);
    color: var(--text-tertiary, #6c757d);
    border: 1px solid rgba(108, 117, 125, 0.4);
}

.priority-badge.low {
    background: rgba(23, 162, 184, 0.2);
    color: var(--accent-info, #17a2b8);
    border: 1px solid rgba(23, 162, 184, 0.4);
}

/* Category Display */
.category-display {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.category-icon {
    font-size: 1rem;
}

.category-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    color: var(--text-secondary, rgba(255, 255, 255, 0.8));
}

/* Reporter Display */
.reporter-display {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.reporter-icon {
    font-size: 1rem;
}

.reporter-name {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Date Display */
.date-display time {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.05));
    padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
}

/* Actions Section */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md, 1rem);
}

.youtrack-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    background: rgba(0, 122, 204, 0.1);
    border: 2px solid rgba(0, 122, 204, 0.2);
    border-radius: var(--radius-lg, 12px);
    color: var(--accent-primary, #007acc);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    justify-content: center;
}

.youtrack-link:hover {
    background: rgba(0, 122, 204, 0.2);
    border-color: rgba(0, 122, 204, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 204, 0.3);
}

.link-icon, .external-icon {
    font-size: 1rem;
}

.external-icon {
    opacity: 0.7;
}

/* Content Area */
.issue-detail-content-area {
    flex: 1;
    padding: var(--space-xl, 2rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl, 2rem);
}

.description-section h3,
.steps-to-reproduce-section h3,
.additional-info-section h3,
.bug-details-section h3 {
    color: var(--text-primary, #ffffff);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 var(--space-lg, 1.5rem) 0;
    font-family: var(--font-display, 'Space Grotesk');
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding-bottom: var(--space-sm, 0.5rem);
}

.description-content {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 2rem);
    line-height: 1.7;
    max-height: none;
    overflow: visible;
}

.description-text {
    color: var(--text-primary, #ffffff);
    font-size: 1rem;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.description-text p {
    margin: 0 0 var(--space-lg, 1.5rem) 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.description-text p:empty {
    display: none;
}

.description-text em {
    font-style: italic;
    opacity: 0.8;
}

/* Bug Details Section */
.bug-details-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl, 2rem);
}

.bug-detail-item {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-xl, 2rem);
}

.bug-detail-item label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary, #007acc);
    margin-bottom: var(--space-md, 1rem);
    font-family: var(--font-display, 'Space Grotesk');
}

.platforms-list {
    display: flex;
    gap: var(--space-sm, 0.5rem);
    flex-wrap: wrap;
}

.platform-tag {
    background: var(--accent-primary, #007acc);
    color: white;
    padding: var(--space-xs, 0.25rem) var(--space-md, 1rem);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 122, 204, 0.2);
}

.frequency-display {
    /*background: var(--bg-quaternary, rgba(255, 255, 255, 0.05));*/
    padding: var(--space-md, 1rem);
    /*border-radius: var(--radius-md, 8px);*/
    /*border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));*/
    color: var(--text-primary, #ffffff);
    font-weight: 500;
}

.modal-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

/*.modal-step-item {*/
/*    background: var(--bg-quaternary, rgba(255, 255, 255, 0.05));*/
/*    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));*/
/*    border-radius: var(--radius-md, 8px);*/
/*    padding: var(--space-lg, 1.5rem);*/
/*    margin-bottom: var(--space-md, 1rem);*/
/*    color: var(--text-primary, #ffffff);*/
/*    line-height: 1.6;*/
/*    position: relative;*/
/*    padding-left: var(--space-3xl, 3rem);*/
/*    counter-increment: step-counter;*/
/*}*/

/*.modal-step-item::before {*/
/*    content: counter(step-counter);*/
/*    position: absolute;*/
/*    left: var(--space-lg, 1.5rem);*/
/*    top: var(--space-lg, 1.5rem);*/
/*    background: var(--accent-primary, #007acc);*/
/*    color: white;*/
/*    width: 28px;*/
/*    height: 28px;*/
/*    border-radius: 50%;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    font-size: 0.8rem;*/
/*    font-weight: 700;*/
/*    box-shadow: 0 2px 4px rgba(0, 122, 204, 0.3);*/
/*}*/

[data-theme="light"] .step-item {
    color: #333;
}

/*.modal-step-item:last-child {*/
/*    margin-bottom: 0;*/
/*}*/

/* Modal Vote Button Adjustments */
.issue-detail-modal .vote-button {
    width: 100%;
    justify-content: center;
    padding: var(--space-md, 1rem) var(--space-lg, 1.5rem);
    border-radius: var(--radius-lg, 12px);
    font-size: 1rem;
    margin-bottom: var(--space-md, 1rem);
}

.issue-detail-modal .state-display .status-badge,
.issue-detail-modal .stage-display .status-badge {
    position: static !important;
    float: none !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.issue-detail-modal .issue-detail-sidebar .status-badge,
.issue-detail-modal .issue-detail-sidebar .stage-badge {
    display: flex !important;
    visibility: visible !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .issue-detail-main {
        grid-template-columns: 280px 1fr;
    }

    .issue-detail-sidebar {
        padding: var(--space-lg, 1.5rem);
    }

    .issue-detail-content-area {
        padding: var(--space-lg, 1.5rem);
    }
}

@media (max-width: 768px) {
    .issue-detail-modal {
        padding: var(--space-md, 1rem);
    }

    .issue-detail-content {
        max-height: 95vh;
        border-radius: var(--radius-lg, 12px);
    }

    .issue-detail-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .issue-detail-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
        padding: var(--space-lg, 1.5rem);
        max-height: 40vh;
        overflow-y: auto;
    }

    .issue-detail-content-area {
        padding: var(--space-lg, 1.5rem);
    }

    .issue-detail-header {
        padding: var(--space-lg, 1.5rem);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md, 1rem);
    }

    .issue-detail-close {
        position: absolute;
        top: var(--space-lg, 1.5rem);
        right: var(--space-lg, 1.5rem);
    }

    .issue-title-large {
        font-size: 1.4rem;
        padding-right: 60px;
    }

    .issue-meta-section,
    .issue-actions-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md, 1rem);
    }

    .issue-meta-section h3,
    .issue-actions-section h3 {
        grid-column: 1 / -1;
    }

    .modal-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .issue-detail-modal {
        padding: var(--space-sm, 0.5rem);
        align-items: flex-start;
        padding-top: var(--space-lg, 1.5rem);
    }

    .issue-detail-content {
        max-height: 95vh;
        border-radius: var(--radius-md, 8px);
    }

    .issue-detail-header {
        padding: var(--space-md, 1rem);
    }

    .issue-detail-sidebar {
        padding: var(--space-md, 1rem);
        max-height: 35vh;
    }

    .issue-detail-content-area {
        padding: var(--space-md, 1rem);
        gap: var(--space-lg, 1.5rem);
    }

    .issue-title-large {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .issue-id-large {
        font-size: 0.8rem;
        padding: var(--space-xs, 0.25rem) var(--space-md, 1rem);
    }

    .description-content,
    .bug-detail-item {
        padding: var(--space-lg, 1.5rem);
    }

    /*.modal-step-item {*/
    /*    padding: var(--space-md, 1rem);*/
    /*    padding-left: var(--space-2xl, 2.5rem);*/
    /*}*/
    /*.modal-step-item::before {*/
    /*    left: var(--space-md, 1rem);*/
    /*    top: var(--space-md, 1rem);*/
    /*    width: 24px;*/
    /*    height: 24px;*/
    /*    font-size: 0.7rem;*/
    /*}*/
    .issue-meta-section,
    .issue-actions-section {
        grid-template-columns: 1fr;
        gap: var(--space-sm, 0.5rem);
    }
}

/* Dark Theme Adjustments */
@media (prefers-color-scheme: dark) {
    .issue-detail-content {
        background: #0d0d0d;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .issue-detail-sidebar {
        background: rgba(255, 255, 255, 0.02);
    }

    .description-content,
    .bug-detail-item {
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

/* Light Theme Adjustments */
[data-theme="light"] .issue-detail-modal {
    color: #333;
}

[data-theme="light"] .issue-detail-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: #333;
}

[data-theme="light"] .issue-detail-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .issue-detail-sidebar {
    background: rgba(0, 0, 0, 0.02);
    border-right-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .issue-title-large {
    color: #222;
}

[data-theme="light"] .issue-meta-section h3,
[data-theme="light"] .issue-actions-section h3,
[data-theme="light"] .description-section h3,
[data-theme="light"] .steps-to-reproduce-section h3,
[data-theme="light"] .bug-details-section h3 {
    color: #333;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .meta-item label {
    color: #666;
}

[data-theme="light"] .meta-value {
    color: #333;
}

[data-theme="light"] .type-display,
[data-theme="light"] .category-display,
[data-theme="light"] .reporter-display {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .date-display time {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .description-content,
[data-theme="light"] .bug-detail-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .description-text {
    color: #333;
}

/*[data-theme="light"] .frequency-display,*/
/*[data-theme="light"] .modal-step-item {*/
/*    background: rgba(0, 0, 0, 0.03);*/
/*    border-color: rgba(0, 0, 0, 0.1);*/
/*    color: #333;*/
/*}*/

[data-theme="light"] .frequency-display {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="light"] .bug-detail-item label {
    color: #007acc;
}

[data-theme="light"] .issue-detail-close {
    color: #666;
}

[data-theme="light"] .issue-detail-close:hover {
    background: #dc3545;
    color: white;
}

/* Light theme adjustments for new states */
[data-theme="light"] .status-badge,
[data-theme="light"] .stage-badge {
    color: #333;
}

[data-theme="light"] .status-badge.open,
[data-theme="light"] .status-badge.submitted,
[data-theme="light"] .status-badge.to-be-discussed,
[data-theme="light"] .status-badge.reopened {
    color: #005a9c;
}

[data-theme="light"] .status-badge.backlog,
[data-theme="light"] .status-badge.planned {
    color: #2980b9;
}

[data-theme="light"] .status-badge.testing,
[data-theme="light"] .status-badge.review,
[data-theme="light"] .status-badge.verified {
    color: #138496;
}

[data-theme="light"] .status-badge.resolved,
[data-theme="light"] .status-badge.fixed,
[data-theme="light"] .status-badge.finished {
    color: #1e7e34;
}

[data-theme="light"] .status-badge.wont-fix,
[data-theme="light"] .status-badge.cant-reproduce,
[data-theme="light"] .status-badge.duplicate,
[data-theme="light"] .status-badge.obsolete {
    color: #bd2130;
}


/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .issue-detail-content {
        border-width: 2px;
    }

    .status-badge, .priority-badge {
        border-width: 2px;
    }

    .youtrack-link {
        border-width: 3px;
    }

    .issue-detail-close:focus {
        outline-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .issue-detail-modal,
    .issue-detail-content {
        transition: none;
    }

    .issue-detail-modal.show .issue-detail-content {
        transform: none;
    }

    .youtrack-link:hover,
    .issue-detail-close:hover {
        transform: none;
    }
}

/* Focus Management */
.issue-detail-modal:focus-within .issue-detail-content {
    outline: 2px solid var(--accent-primary, #007acc);
    outline-offset: 4px;
}

/* Smooth Scrolling */
.issue-detail-sidebar,
.issue-detail-content-area {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Modal */
.issue-detail-sidebar::-webkit-scrollbar,
.issue-detail-content-area::-webkit-scrollbar {
    width: 8px;
}

.issue-detail-sidebar::-webkit-scrollbar-track,
.issue-detail-content-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.issue-detail-sidebar::-webkit-scrollbar-thumb,
.issue-detail-content-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.issue-detail-sidebar::-webkit-scrollbar-thumb:hover,
.issue-detail-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Clickable Card Cursor */
.issue-card {
    cursor: pointer;
    position: relative;
}

.issue-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.issue-card:hover::after {
    opacity: 1;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: no-preference) {
    .issue-detail-modal {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .issue-detail-content {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Bug specific fields */

/* Bug-specific field styling */
.bug-specific-field {
    padding-left: 8px;
    margin-left: -8px;
}

/* Frequency display */
.frequency-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

/* Platforms display */
.platforms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.platform-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
}

.platform-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}


/*!* Steps to reproduce section *!*/
/*.steps-to-reproduce-section {*/
/*    background: #4a4a4c;*/
/*    border: 1px solid #e9ecef;*/
/*    border-radius: 8px;*/
/*    padding: 16px;*/
/*    margin-top: 16px;*/
/*}*/

/*.steps-to-reproduce-section h3 {*/
/*    margin-top: 0;*/
/*    color: #495057;*/
/*    font-size: 1.1em;*/
/*    margin-bottom: 12px;*/
/*}*/

.steps-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
    counter-reset: step-counter;
}

.modal-step-item {
    counter-increment: step-counter;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    position: relative;
}

.modal-step-item::before {
    content: counter(step-counter);
    background: #007bff;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 8px;
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
}

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

/* Legacy bug details adjustments */
.bug-details-section {
    margin-top: 16px;
}

.bug-detail-item {
    margin-bottom: 12px;
}

.bug-detail-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
}

.platform-tag {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .platforms-list {
        flex-direction: column;
        gap: 2px;
    }

    .platform-badge {
        text-align: center;
    }

    .modal-step-item {
        padding-left: 16px;
    }

    .modal-step-item::before {
        left: -8px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {

    /*.steps-to-reproduce-section {*/
    /*    background: #2d3748;*/
    /*    border-color: #4a5568;*/
    /*}*/
    /*.steps-to-reproduce-section h3 {*/
    /*    color: #e2e8f0;*/
    /*}*/
    .modal-step-item {
        background: #4a5568;
        border-left-color: #63b3ed;
        color: #e2e8f0;
    }

    .modal-step-item::before {
        background: #63b3ed;
    }

    .platform-tag {
        background: #4a5568;
        color: #e2e8f0;
    }
}