/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #212529;
    line-height: 1.6;
}

/* Repository container */
.repo {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.repo h2 {
    color: #212529;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.repo h3 {
    color: #495057;
    font-size: 1.25rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Issue container */
.issue-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.issue {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.issue:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Issue headers */
.issue h4 {
    margin: 0 0 0.75rem 0;
    color: #212529;
    font-size: 1.1rem;
    font-weight: 500;
}

.issue h4 a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.issue h4 a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* State badges */
.issue .state {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Comments section */
.issue h5 {
    color: #495057;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-left: 1rem;
}

.comment {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1rem;
}

.comment .body {
    margin-top: 0.5rem;
    color: #495057;
    font-size: 0.95rem;
    overflow-x: scroll;
}

/* Comment body content styling */
.comment .body p {
    margin: 0.5rem 0;
}

.comment .body pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-size: 0.875rem;
}

.comment .body code {
    background-color: #f6f8fa;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
    font-size: 0.875rem;
}

/* Events details */
.events-container{
    details {
        margin-top: 1rem;
        border-top: 1px solid #dee2e6;
        padding-top: 1rem;
    }

    summary {
        cursor: pointer;
        color: #495057;
        font-weight: 500;
        font-size: 1rem;
        user-select: none;
        transition: color 0.2s ease;
    }

    summary:hover {
        color: #007bff;
    }

    details[open] summary {
        margin-bottom: 0.75rem;
        color: #007bff;
    }
}

.event-list, .commit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
}


.event, .commit {
    padding: 0.5rem;
    background-color: #ffffff;
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Timestamp styling (already defined but included for completeness) */
.timestamp {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Links general styling */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}



/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty states */
.issue-list:empty::after {
    content: "No items to display";
    color: #6c757d;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 2rem;
}

.issue-title {
  font-size: 1.2em;
  font-weight: bold;
}



.issue {
    position: relative; /*needed to get the tags in the top-right of the parent*/

    summary {
        padding-right: 220px;
    }
}

.issue-tags {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    z-index: 1;
}

.issue-tags .tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #f0f0f0;
    color: #666;
    white-space: nowrap;
}

.issue-tags .updated-time {
    background-color: #e3f2fd;
    color: #1976d2;
}

.issue-tags .repo-status {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .repo {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .issue {
        padding: 1rem;

        /*move summary below tags*/
        summary {
            padding-right: 0;
            padding-top: 1.5rem;
        }
    }

    .comment-list,
    .event-list {
        margin-left: 0.5rem;
    }

    .repo h2 {
        font-size: 1.5rem;
    }

    .repo h3 {
        font-size: 1.125rem;
    }
}