/* ILS shared components — buttons, nav pills, footer, forms, cards, badges */

.btn-success,
.btn-primary {
    background-color: var(--ils-accent);
    border-color: var(--ils-accent);
}

.btn-success:hover,
.btn-primary:hover {
    background-color: #c41945;
    border-color: #c41945;
}

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

.btn-outline-primary:hover {
    background-color: var(--ils-primary);
    border-color: var(--ils-primary);
    color: #fff;
}

.alert-info {
    background-color: var(--ils-primary-light);
    color: var(--ils-primary);
}

/* Pill navigation (Conference Hub, Registration, cross-site) */
.hub-nav,
.hub-filter-nav,
.ils-ecosystem-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.hub-nav a,
.hub-filter-nav a,
.ils-ecosystem-nav a {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border: 1px solid #d9e2ec;
    border-radius: var(--ils-radius-pill);
    background: #f8fafc;
    color: var(--ils-primary);
    text-decoration: none;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.hub-nav a:hover,
.hub-filter-nav a:hover,
.ils-ecosystem-nav a:hover {
    background: #eef4ff;
    text-decoration: none;
}

.hub-nav a.active,
.hub-filter-nav a.active,
.ils-ecosystem-nav a.active {
    background: var(--ils-primary);
    color: #ffffff;
    border-color: var(--ils-primary);
}

.hub-nav-divider {
    width: min(100%, 40rem);
    height: 1px;
    margin: 0.15rem auto 0.85rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #d9e2ec 15%,
        #d9e2ec 85%,
        transparent 100%
    );
}

.hub-nav a.hub-nav-auth,
.hub-nav-logout-form button.hub-nav-auth {
    display: inline-block;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--ils-accent);
    border-radius: var(--ils-radius-pill);
    background: var(--ils-accent);
    color: #fff !important;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
}

.hub-nav a.hub-nav-auth:hover,
.hub-nav a.hub-nav-auth:focus,
.hub-nav-logout-form button.hub-nav-auth:hover,
.hub-nav-logout-form button.hub-nav-auth:focus {
    background: #c41945;
    border-color: #c41945;
    color: #fff !important;
    text-decoration: none;
    outline: none;
    box-shadow: 0 0 0 3px rgba(226, 30, 81, 0.25);
}

.hub-nav-logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.hub-nav-disabled {
    color: var(--ils-muted-text, #64748b);
    cursor: help;
    font-weight: 500;
    padding: 0.35rem 0.5rem;
}

.ils-registration-unavailable {
    color: var(--ils-body-text, #334155);
    font-size: 0.95rem;
}

/* Footer */
footer .ils-footer-links,
.ils-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1rem;
    margin-bottom: 0.75rem;
}

footer .ils-footer-links a,
.ils-footer-links a {
    color: var(--ils-primary);
    text-decoration: none;
}

footer .ils-footer-links a:hover,
.ils-footer-links a:hover {
    color: var(--ils-accent);
    text-decoration: underline;
}

footer .ils-powered,
.ils-powered {
    color: var(--ils-muted);
}

/* Breadcrumbs */
.ils-breadcrumb {
    font-size: 0.9rem;
    color: var(--ils-muted);
    margin-bottom: 1rem;
}

.ils-breadcrumb a {
    color: var(--ils-primary);
    text-decoration: none;
}

.ils-breadcrumb a:hover {
    color: var(--ils-accent);
    text-decoration: underline;
}

.ils-breadcrumb-sep {
    margin: 0 0.35rem;
}

.ils-breadcrumb-current {
    color: #374151;
    font-weight: 600;
}

/* Cards and badges */
.hub-event-card {
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid var(--ils-border);
    border-radius: var(--ils-radius-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hub-event-card:hover {
    border-color: var(--ils-primary);
    box-shadow: 0 2px 8px rgba(3, 32, 117, 0.08);
    text-decoration: none;
}

.hub-event-card strong {
    color: var(--ils-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.hub-event-card span {
    color: var(--ils-muted);
    font-size: 0.95rem;
}

.hub-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: var(--ils-radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hub-badge-open {
    background: #e8f5ec;
    color: #1b7a3d;
}

.hub-badge-upcoming {
    background: #eef2ff;
    color: var(--ils-primary);
}

.hub-badge-closed {
    background: #f3f4f6;
    color: var(--ils-muted);
}

.hub-badge-draft {
    background: #fff4e5;
    color: #9a6700;
}

/* Shared form styling */
.ils-form label.inline-form-label,
.ils-form .form-control-label,
.ils-account-form label.inline-form-label,
.ils-account-form .form-control-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ils-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.ils-form input[type="email"],
.ils-form input[type="password"],
.ils-form input[type="text"],
.ils-form select,
.ils-account-form input[type="email"],
.ils-account-form input[type="password"],
.ils-account-form input[type="text"],
.ils-account-form select {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d9e6;
    border-radius: var(--ils-radius-sm);
    font-size: 1rem;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

.ils-form input:focus,
.ils-form select:focus,
.ils-account-form input:focus,
.ils-account-form select:focus {
    outline: none;
    border-color: var(--ils-primary);
    box-shadow: 0 0 0 3px rgba(3, 32, 117, 0.15);
}

.ils-logo img,
.hub-logo,
.site-logo,
#hub-logo,
#event-logo,
.organizer-logo,
.event-logo {
    max-width: 82px;
    width: auto;
    height: auto;
}

@media (max-width: 768px) {
    .ils-logo img,
    .hub-logo,
    .site-logo,
    #hub-logo,
    #event-logo,
    .organizer-logo,
    .event-logo {
        max-width: 62px;
    }
}

@media (max-width: 640px) {
    .hub-nav a,
    .hub-filter-nav a,
    .hub-nav a.hub-nav-auth,
    .ils-account-nav a,
    .hub-event-nav a,
    .ils-ecosystem-nav a {
        white-space: normal;
    }
}
