/* Item Detail Modal Styles */

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title-section .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
}

.item-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.75rem;
}

.badge-issue {
    background: rgba(34, 139, 34, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 139, 34, 0.3);
}

.badge-pr {
    background: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.3);
}

.badge-draft {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.badge-default {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
}

.description-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.description-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #22c55e;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.metadata-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.metadata-value {
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metadata-value i {
    color: var(--primary-color);
}

.priority-high .metadata-value {
    color: #ef4444;
}

.priority-high .metadata-value i {
    color: #ef4444;
}

.priority-medium .metadata-value {
    color: #f59e0b;
}

.priority-medium .metadata-value i {
    color: #f59e0b;
}

.priority-low .metadata-value {
    color: #6c757d;
}

.priority-low .metadata-value i {
    color: #6c757d;
}

.custom-fields-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.custom-field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.field-name {
    font-weight: 600;
    color: var(--text-secondary);
}

.field-value {
    color: var(--text-primary);
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-close-white {
    filter: invert(1) brightness(2);
}

/* Scrollbar Styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .metadata-grid {
        grid-template-columns: 1fr;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}
