/*
 * commitfest.postgresql.org specific styles
 */

body {
    --bs-body-font-size: 14px;
    --bs-body-font-family: -apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
    --bs-font-sans-serif: -apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

/* Bootstrap 5 inline delete/close buttons */
.btn-outline-danger.btn-sm {
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-color: #dc3545;
    color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger.btn-sm:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* General form styling */
.form-horizontal div.form-group {
    margin-bottom: 10px;
}
div.form-group div.controls ul {
    list-style-type: none;
    margin: 0px;
    padding: 0px;
}
div.form-group div.controls ul li {
    display: inline;
}
div.form-group div.controls ul li label {
    display: inline;
    font-weight: normal;
    vertical-align: middle;
}
div.form-group div.controls ul li label input {
    display: inline;
    vertical-align: middle;
}

div.form-group div.controls input.threadpick-input {
    width: 80%;
    display: inline;
}

/*
 * Attach thread dialog
 */
#attachThreadListWrap.loading {
    display: block;
    background: url("/proxy/123456/commitfest.postgresql.org/media/commitfest/spinner.gif") no-repeat center;
    width: 124px;
    height: 124px;
    margin: 0 auto;
}
#attachThreadListWrap.loading * {
    display: none;
}

/*
 * Annotate message dialog */
#annotateMessageBody.loading {
    display: block;
    background: url("/proxy/123456/commitfest.postgresql.org/media/commitfest/spinner.gif") no-repeat center;
    width: 124px;
    height: 124px;
    margin: 0 auto;
}
#annotateMessageBody.loading * {
    display: none;
}

.cfbot-summary img {
    margin-top: -3px;
}

.github-logo {
    height: 20px;
}

.additions {
    font-weight: bold;
    color: green;
}

.deletions {
    font-weight: bold;
    color: red;
}

.search-bar {
    display: inline-block;
}

/* Navigation improvements for Bootstrap 5 */
nav[aria-label="breadcrumb"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

nav[aria-label="breadcrumb"] .breadcrumb {
    margin-bottom: 0;
}

nav[aria-label="breadcrumb"] .float-end {
    font-size: 0.875rem;
}

:root {
    --bs-info-rgb: 0, 178, 214;
    --bs-warning-rgb: 204, 133, 1;
}

/* Remove underlines from tag links */
a:has(.badge) {
    text-decoration: none !important;
}

a:has(.badge):hover {
    text-decoration: none !important;
}

a .badge {
    text-decoration: none !important;
}

a:hover .badge {
    text-decoration: none !important;
}

/* Simple close button without float */
.btn-close-nofloat {
    float: none;
    margin-left: 0.5rem;
}

/* Prevent navbar button text from wrapping */
.navbar .btn {
    white-space: nowrap;
}

.navbar .nav-link {
    white-space: nowrap;
}

/* Light grey btn-secondary with dark text that darkens on hover */
.btn-secondary {
    --bs-btn-color: #495057;
    --bs-btn-bg: #f2f2f2;
    --bs-btn-border-color: #f2f2f2;
    --bs-btn-hover-color: #212529;
    --bs-btn-hover-bg: #dee2e6;
    --bs-btn-hover-border-color: #dee2e6;
    --bs-btn-focus-shadow-rgb: 222, 226, 230;
    --bs-btn-active-color: #212529;
    --bs-btn-active-bg: #ced4da;
    --bs-btn-active-border-color: #ced4da;
}

/* Responsive navbar layout */
.navbar-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.navbar-nav {
    margin-bottom: 0.5rem;
}

/* Mobile: stack actions vertically, tablet+: horizontal */
.navbar-actions {
    flex-direction: column;
    gap: 0.5rem !important;
    align-items: stretch !important;
}

.navbar-actions .input-group {
    width: 100% !important;
}

@media (min-width: 576px) {
    .navbar-actions {
        flex-direction: row;
        align-items: center;
    }

    .navbar-actions .input-group {
        width: 250px;
    }
}

@media (min-width: 992px) {
    .navbar-content-wrapper {
        flex-direction: row;
        align-items: center;
    }

    .navbar-nav {
        margin-bottom: 0;
    }

    .navbar-actions {
        margin-left: auto;
    }

    .navbar-actions .input-group {
        width: 300px;
    }
}
