:root {
    /* Meetamorph brand; an event may replace it (EventBrandingStyle) with a colour that keeps 4.5:1 on white and on the page. */
    --tr-brand: #082a44;
    --tr-brand-rgb: 8, 42, 68;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
}

a, .btn-link {
    color: var(--tr-brand);
}

.bg-primary {
    background-color: var(--tr-brand) !important;
}

.text-primary {
    color: var(--tr-brand) !important;
}

/* Bootstrap's #6c757d only reaches 4.4:1 on the page background (#f6f8fb) */
.text-muted,
.text-body-secondary {
    color: #5c636a !important;
}

.btn-outline-secondary {
    color: #5c636a;
    border-color: #5c636a;
}

.link-primary {
    color: var(--tr-brand) !important;
    text-decoration-color: var(--tr-brand) !important;
}

.btn-primary {
    color: #fff;
    background-color: var(--tr-brand);
    border-color: var(--tr-brand);
}

.btn-outline-primary {
    color: var(--tr-brand);
    border-color: var(--tr-brand);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: #fff;
    background-color: var(--tr-brand);
    border-color: var(--tr-brand);
}

.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 #0b3a5f;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.request-details-list {
    margin: 0;
    padding: 0;
}

.request-details-item + .request-details-item {
    margin-top: 1rem;
}

.request-details-list dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bs-secondary-color);
    margin-bottom: 0.15rem;
}

.request-details-list dt::after {
    content: ":";
    margin-left: 0.25rem;
}

.request-details-list dd {
    margin-bottom: 0;
}

.text-pre-line {
    white-space: pre-line;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNT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NzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.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;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background-color: #6c757d;
}

.social-icon-linkedin {
    background-color: #0a66c2;
}

.social-icon-mastodon {
    background-color: #563acc;
}

.social-icon-bluesky {
    background: linear-gradient(135deg, #009ad8, #72eaff);
    color: #003049;
}

.social-icon-x {
    background-color: #111;
}

/* Validation Summary Accesible */
#validationSummary:focus {
    outline: 2px solid #e50000;
    outline-offset: 2px;
}

/* Animación para nuevos perfiles cargados */
@keyframes highlightNewProfile {
    0% {
        background-color: #ffe066;
    }
    100% {
        background-color: transparent;
    }
}

.profile-row-new {
    animation: highlightNewProfile 1.5s ease-out;
}

/* Aplicar animación al card en versión mobile */
.profile-row-new .card {
    animation: highlightNewProfile 1.5s ease-out;
}

/* Chat list (HelpRequestChat) */
.chat-list {
    max-height: 24rem;
    overflow-y: auto;
}

.chat-list-item {
    outline: none;
}

.chat-list-item:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.chat-list-item-active {
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.1);
}

.chat-list-item-placeholder {
    padding: 0.5rem 0;
}

.chat-bubble {
    white-space: pre-line;
    max-width: min(40rem, 100%);
}

/* Layout helpers para ProfileCard */
.profile-card-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card-mobile .profile-photo {
    order: -1;
}

/* Grid layout para ProfileCard desktop */
.profile-card-desktop {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    grid-template-areas: "photo heading badge button";
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
}

.profile-card-desktop .profile-avatar {
    grid-area: photo;
}

.profile-card-desktop .profile-heading {
    grid-area: heading;
}

.profile-card-desktop .profile-role {
    grid-area: badge;
}

.profile-card-desktop .profile-action {
    grid-area: button;
}

/* Directory rows: separated by a rule on desktop; on phones each ProfileCard is already a card */
@media (min-width: 768px) {
    .profile-row {
        border-bottom: 1px solid #dee2e6;
    }

    .profile-row:last-child {
        border-bottom: none;
    }
}

#validationSummary h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

#validationSummary ul {
    margin-bottom: 0;
}

#validationSummary .alert-link {
    color: #842029;
    font-weight: 600;
    text-decoration: underline;
}

#validationSummary .alert-link:hover,
#validationSummary .alert-link:focus {
    color: #58151c;
}

/* Ocultar validation summary en móvil pero mantener accesible */
@media (max-width: 767.98px) {
    #validationSummary.d-none.d-md-block {
        position: absolute;
        left: -10000px;
        width: 1px;
        height: 1px;
        overflow: hidden;
    }
}

/* Buttons that fill the row on phones and shrink to content from md up */
@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

@media (min-width: 992px) {
    .w-lg-auto {
        width: auto !important;
    }
}

/* Toasts must stay above modals and the Blazor error bar */
.toast-container {
    z-index: 1090;
}

/* Long user-provided values must never force horizontal scrolling */
.card-body,
.list-group-item,
.toast-body,
.alert {
    overflow-wrap: anywhere;
}

/* Attendee messaging */
.chat-bubble-mine {
    background-color: var(--tr-brand);
    color: #fff;
}

.chat-bubble-mine time,
.chat-bubble-mine .chat-read-receipt {
    color: rgba(255, 255, 255, 0.85);
}

.chat-bubble-theirs {
    background-color: #fff;
    color: #212529;
    border: 1px solid #dee2e6;
}

.chat-bubble-theirs time {
    color: #495057;
}

.attendee-chat-list {
    max-height: 32rem;
}

/* In a two-person chat the bubbles already say who is who: no row highlight, only the focus ring. */
.attendee-chat-list .chat-list-item-active {
    background-color: transparent;
}

.attendee-chat-list .chat-list-item:focus-visible {
    outline: 3px solid #0b3a5f;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.inbox-list .list-group-item {
    border-color: #dee2e6;
}

.inbox-item {
    color: inherit;
}

.inbox-item:hover,
.inbox-item:focus {
    background-color: #f1f5f9;
}

.inbox-item:focus-visible {
    outline: 3px solid #0b3a5f;
    outline-offset: -3px;
}

.inbox-unread .inbox-name,
.inbox-unread .inbox-snippet {
    font-weight: 700;
    color: var(--tr-brand);
}

.inbox-unread-badge {
    background-color: #ffd166;
    color: #082a44;
    font-weight: 700;
}

.inbox-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.profile-avatar-img {
    object-fit: cover;
}

.profile-avatar-placeholder {
    background-color: #f0f0f0;
    color: #6c757d;
}

/* Language selector: the separator bar is decorative and hidden before the first entry. */
#nav-culture-selector li:first-child .culture-separator {
  display: none;
}

/* Console section tabs: Bootstrap's link blue is 4.2:1 on the page background; this one is 6:1. */
/* Bootstrap's link blue is 4.23:1 on the page background; the darker shade passes. */
.product-landing-tabs .nav-link {
    color: #0a58ca;
}

.product-landing-tabs .nav-link.active {
    color: var(--bs-body-color);
}

.console-sections .nav-link {
    color: #0a58ca;
}

.console-sections .nav-link.active {
    color: #fff;
    background-color: #0a58ca;
}

/* Badge sheet (console): cards of 9 x 6 cm, two per row on A4, nothing else on paper. */
.badge-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

.badge-card {
    border: 1px solid #6c757d;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    background: #fff;
    color: #1b1b1b;
    break-inside: avoid;
}

.badge-card p {
    margin-bottom: 0.25rem;
}

.badge-card-event {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.badge-card-name {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.badge-card-org,
.badge-card-role,
.badge-card-id {
    font-size: 1rem;
}

.badge-card-qr {
    display: block;
    margin: 0.5rem auto;
}

@media print {
    .layout-header,
    .site-footer,
    .no-print,
    #blazor-error-ui {
        display: none !important;
    }

    .badge-sheet {
        grid-template-columns: repeat(2, 9cm);
        gap: 0.5cm;
    }

    .badge-card {
        width: 9cm;
        min-height: 6cm;
    }
}

/* Event logo: any shape fits the square it is given. */
.navbar-brand img,
.brand-logo-preview {
    object-fit: contain;
}

/* Console, branding: a sample of a suggested colour and the page background of the preview. */
.brand-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    vertical-align: -0.15em;
    border: 1px solid #5c636a;
    border-radius: 0.25rem;
}

.brand-preview-page {
    background-color: #f6f8fb;
}

/* Top bar links: solid white, so every brand colour the console accepts keeps 4.5:1 with them,
   and the current page is underlined rather than only brighter. Global because NavLink is a
   child component that scoped CSS does not reach. */
.layout-navbar {
    --bs-navbar-color: #fff;
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
}

.layout-navbar .navbar-nav .nav-link.active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.35em;
}

/* Platform legal links in the footer: 24px tall targets even when they wrap on a narrow screen (WCAG 2.5.8). */
.footer-platform-legal a {
    display: inline-block;
    padding: 0.25rem 0;
}

/* Platform product page: keep the intro paragraph to a readable line length. */
.product-landing-lead {
    max-width: 46rem;
}

/* Platform account profile: photo thumbnail and network labels, as in the event profile. */
.account-photo {
    max-width: 200px;
    max-height: 200px;
}

.account-network-name {
    min-width: 150px;
}
