/* Bootstrap variable overrides matching ProjectPortal */
:root {
    --bs-link-color: #2a6496;
    --bs-light-rgb: 238, 238, 238;
    --bs-font-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.btn-light {
    --bs-btn-bg: #eee;
    --bs-btn-border-color: #333;
    --bs-btn-hover-border-color: #000;
}

a {
    text-decoration: none;
}

caption {
    color: #000;
    padding-bottom: .25rem;
}

.form-control {
    border-color: #333;
    caret-color: #333;
}

input {
    caret-color: #333;
}

.form-select {
    border-color: #333;
}

/* Offset content below fixed navbar */
body {
    padding-top: 58px;
    padding-bottom: 20px;
    caret-color: transparent;
}

.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

img.logo {
    max-width: 100%;
}

/* Login card */
.login-jumbotron {
    font-size: 18px;
}

@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
    .login-jumbotron {
        font-size: 21px;
    }
}

/* Menu cards on Home page */
.cci-menu-card {
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.cci-menu-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.cci-menu-card .card-header {
    background-color: #212529;
    color: #fff;
    font-weight: 600;
    border-radius: 0.375rem 0.375rem 0 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #333;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Table heads use Bootstrap's .sticky-top utility for position/z-index; just override the
   top offset so they dock below the fixed navbar instead of at the very top of the viewport. */
thead.sticky-top {
    top: 58px;
}

/* Outline buttons default to a transparent background, which would otherwise let a colored
   table row (e.g. an enabled/recommended row highlight) show through. Give them a plain white
   background at rest - WITHOUT !important - so Bootstrap's own :hover rule (which outranks a
   single class selector thanks to the pseudo-class) still fills the button and flips the text
   to white as usual, instead of leaving white-on-white unreadable text. */
.btn-white-bg {
    background-color: #fff;
}

/* Rows that navigate to an "edit" page on click (Admin Users, Invitations lists). */
tr.clickable-row {
    cursor: pointer;
}

/* Compact icon-only controls (chat message actions): bare icon at rest, filled circle with an
   inverted (white) icon on hover. Background color is hardcoded per text-color variant rather
   than "background-color: currentColor" because the hover rule also changes color to white in
   the same declaration block - currentColor would resolve to that new white, not the original.
   Resets all button chrome itself (rather than layering on Bootstrap's .btn/.btn-link) so a
   <button> and an <a> render identically - mixing in .btn brought line-height/vertical-align
   baggage that threw off icon centering inside the circle for the <button> case. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    text-decoration: none;
    vertical-align: middle;
}
.icon-btn.text-secondary:hover {
    background-color: var(--bs-secondary);
    color: #fff !important;
    text-decoration: none;
}
/* Generic outline/filled hover-swap for any icon action (recommendation Submit/Decline/Approve,
   binoculars "view this version", chat message deactivate) - colorable via a text-* modifier
   class instead of being hardcoded to one color, since these vary between warning/danger/success/secondary.
   The two icons are stacked via absolute positioning and cross-fade via opacity (rather than the
   simpler display:none/inline toggle) because "display" can't be transitioned/animated. */
.icon-btn-swap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}
.icon-btn-swap:hover {
    text-decoration: none;
}
.icon-btn-swap .icon-fill,
.icon-btn-swap .icon-outline {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.icon-btn-swap .icon-fill {
    opacity: 0;
}
.icon-btn-swap .icon-outline {
    opacity: 1;
}
.icon-btn-swap:hover .icon-fill {
    opacity: 1;
}
.icon-btn-swap:hover .icon-outline {
    opacity: 0;
}

/* Card-header collapse toggle - chevron rotates to point right when its target is collapsed. */
.card-collapse-toggle i {
    display: inline-block;
    transition: transform 0.2s;
}
.card-collapse-toggle.collapsed i {
    transform: rotate(-90deg);
}
.card-collapse-toggle:focus {
    box-shadow: none;
}

/* Model info modal - each entry is clickable to select that model. */
.model-info-option {
    cursor: pointer;
    transition: background-color 0.15s;
}
.model-info-option:hover {
    background-color: var(--bs-tertiary-bg);
}

/* Click-to-edit recommendation text (Pending/Submitted only - Approved/Declined are locked).
   Hover signals it's editable; a successful auto-save on blur flashes green and fades back out. */
.rec-text-editable {
    cursor: pointer;
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    margin: -0.125rem -0.25rem;
    transition: background-color 0.15s;
}
.rec-text-editable:hover {
    background-color: var(--bs-tertiary-bg, #f1f3f5);
}
@keyframes rec-text-flash {
    0% { background-color: rgba(25, 135, 84, 0.35); }
    100% { background-color: transparent; }
}
.rec-text-flash {
    animation: rec-text-flash 1s ease-out;
}

/* Logout button styled as nav-link */
.navbar-nav .btn-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.navbar-nav .btn-link:hover {
    color: #fff;
}
