/* DJK Eintracht Coesfeld e. V. - Vereins-App
 * Custom CSS für Vereinsfarben und Design
 */

:root {
    /* Vereinsfarben - DJK Eintracht Coesfeld */
    --vereins-blau: #1e3a8a;      /* Dunkelblau */
    --vereins-blau-hell: #3b82f6; /* Helles Blau */
    --vereins-blau-akzent: #93c5fd; /* Akzent (EintrachtNext „Next“) */
    --vereins-weiss: #ffffff;      /* Weiß */
    --vereins-grau: #f8fafc;      /* Sehr helles Grau */
    --vereins-text: #1f2937;      /* Dunkelgrau für Text */
    /* Eckiges Design */
    --theme-radius: 0;
    --radius: 0;
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-border-radius-xl: 0;
    --bs-border-radius-xxl: 0;
    --bs-border-radius-2xl: 0;
    --bs-border-radius-pill: 0;
}

/* Globale Styles */
body {
    background-color: var(--vereins-grau);
    color: var(--vereins-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bg-primary {
    background-color: var(--vereins-blau) !important;
}

/* App-Layout mit linker Sidebar */
.app-shell {
    display: flex;
    min-height: calc(100vh - 0px);
}

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Desktop Sidebar */
.app-sidebar {
    width: 260px;
    flex-shrink: 0;
    flex-direction: column;
    background: linear-gradient(180deg, var(--vereins-blau) 0%, #172554 100%);
    color: var(--vereins-weiss);
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(30, 58, 138, 0.15);
    z-index: 1020;
}

body.app-has-env-banner {
    border-top: 2px solid #f59e0b;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    color: var(--vereins-weiss);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: opacity 0.2s ease;
}

.app-sidebar-brand:hover {
    color: var(--vereins-weiss);
    opacity: 0.9;
}

.app-sidebar-brand i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Vereinslogo */
.app-brand-logo {
    display: block;
    height: auto;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.app-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--vereins-weiss);
    line-height: 0;
    flex-shrink: 0;
}

.app-brand-logo-wrap--sidebar {
    border-radius: 0;
    padding: 0.4rem 0.55rem;
    width: 100%;
}

.app-brand-logo-wrap--mobile {
    border-radius: 0;
    padding: 0.2rem 0.35rem;
}

.app-brand-logo-wrap--hero {
    border-radius: 0;
    padding: 0.75rem 1rem;
    display: inline-flex;
}

.app-brand-logo-wrap--navbar {
    border-radius: 0;
    padding: 0.25rem 0.45rem;
}

.app-brand-logo--sidebar {
    max-height: 56px;
    margin: 0 auto;
}

.app-brand-logo--mobile {
    max-height: 34px;
}

.app-brand-logo--footer {
    max-height: 52px;
}

.app-brand-logo--hero {
    max-height: 110px;
}

.app-brand-logo--navbar {
    max-height: 38px;
}

.app-brand-logo--login {
    max-height: 72px;
    margin: 0 auto;
}

/* EintrachtNext-Wortmarke (wie Präsentation) */
.app-brand-wordmark {
    display: inline-block;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    white-space: nowrap;
}

.app-brand-wordmark-next {
    color: var(--vereins-blau-akzent);
}

.app-brand-wordmark-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
    text-align: center;
}

.app-brand-wordmark-club {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.72);
    white-space: normal;
}

.app-brand-wordmark--sidebar {
    font-size: 1.45rem;
    color: var(--vereins-weiss);
}

.app-brand-wordmark--mobile {
    font-size: 1.15rem;
    color: var(--vereins-weiss);
}

.app-brand-wordmark-block--mobile {
    align-items: flex-start;
    text-align: left;
    width: auto;
}

.app-brand-wordmark-block--mobile .app-brand-wordmark-club {
    font-size: 0.55rem;
    max-width: 11rem;
}

.app-brand-wordmark--hero {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    color: var(--vereins-weiss);
}

.app-brand-wordmark--hero .app-brand-wordmark-next {
    color: var(--vereins-blau-akzent);
}

.app-brand-wordmark--login {
    font-size: 2rem;
    color: var(--vereins-blau);
}

.app-brand-wordmark--login .app-brand-wordmark-next {
    color: var(--vereins-blau-hell);
}

.app-mobile-brand {
    min-width: 0;
}

.navbar-brand .app-brand-logo-wrap {
    margin: 0;
}

.app-sidebar-nav {
    padding: 0.5rem 0;
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.app-sidebar-section {
    padding: 0.5rem 0.75rem 0.75rem;
}

.app-sidebar-section + .app-sidebar-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.25rem;
    padding-top: 0.85rem;
}

.app-sidebar-section-label {
    padding: 0 0.75rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.app-sidebar-list {
    gap: 0.15rem;
}

.app-sidebar-list .nav-item + .nav-item {
    margin-top: 0.1rem;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 40px;
    border: 1px solid transparent;
}

.app-sidebar-link i {
    width: 1.15rem;
    text-align: center;
    flex-shrink: 0;
    margin-right: 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

.app-sidebar-link:hover,
.app-sidebar-link:focus {
    color: var(--vereins-weiss);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.06);
}

.app-sidebar-link.active {
    color: var(--vereins-weiss);
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 var(--vereins-blau-hell);
}

.app-sidebar-link.active i {
    opacity: 1;
}

.app-sidebar-link--sub {
    font-size: 0.85rem;
    min-height: 36px;
    padding: 0.45rem 0.75rem;
    color: rgba(255, 255, 255, 0.72);
}

.app-sidebar-user {
    margin-top: auto;
    flex-shrink: 0;
    padding: 0.85rem 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.18);
}

.app-sidebar-user .app-sidebar-section-label {
    padding-left: 0.75rem;
    margin-bottom: 0.35rem;
}

.app-sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
}

.app-sidebar-user-info > i {
    font-size: 1.75rem;
    opacity: 0.85;
    flex-shrink: 0;
}

.app-sidebar-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.app-sidebar-role-badge {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--vereins-blau) !important;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.45rem;
}

.app-sidebar-user-links {
    margin-top: 0.15rem;
}

.app-sidebar-link--logout:hover {
    background-color: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.25);
}

/* Seiten-Untermenüs (z. B. Mannschaftsportal) */
.app-subnav-wrap {
    background: var(--vereins-weiss);
    border: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 0.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.portal-subnav {
    gap: 0.25rem !important;
    margin-bottom: 0 !important;
}

.portal-subnav .nav-link {
    border-radius: 0;
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.portal-subnav .nav-link:hover {
    color: var(--vereins-blau);
    background-color: #f1f5f9;
    border-color: #e2e8f0;
}

.portal-subnav .nav-link.active {
    color: var(--vereins-weiss);
    background-color: var(--vereins-blau);
    border-color: var(--vereins-blau);
}

/* Mobile Header */
.app-mobile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: var(--vereins-blau);
    color: var(--vereins-weiss);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(30, 58, 138, 0.2);
}

.app-mobile-menu-btn {
    color: var(--vereins-weiss);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.45rem 0.7rem;
    border-radius: 0;
    font-size: 1.15rem;
    line-height: 1;
}

.app-mobile-menu-btn:hover,
.app-mobile-menu-btn:focus {
    color: var(--vereins-weiss);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
}

.app-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--vereins-weiss);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    overflow: hidden;
}

.app-mobile-brand:hover {
    color: var(--vereins-weiss);
    opacity: 0.9;
}

.app-mobile-brand i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.app-mobile-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Offcanvas Sidebar */
.app-sidebar-offcanvas {
    background: linear-gradient(180deg, var(--vereins-blau) 0%, #172554 100%);
    color: var(--vereins-weiss);
    max-width: 85%;
}

.app-sidebar-offcanvas .offcanvas-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--vereins-weiss);
}

.app-sidebar-offcanvas .offcanvas-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 992px) {
    .app-shell {
        min-height: 100vh;
    }
}

/* Buttons - Vereinsblau */
.btn-primary {
    background-color: var(--vereins-blau);
    border-color: var(--vereins-blau);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--vereins-blau-hell);
    border-color: var(--vereins-blau-hell);
    transform: translateY(-1px);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

/* Cards */
.card {
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 0 !important;
    border-bottom: none;
}

/* News-Artikel */
.news-article {
    background: var(--vereins-weiss) !important;
    border-radius: 0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #1e3a8a !important;
    border-left: 4px solid transparent;
}

.news-article:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6 !important;
    transform: translateY(-1px);
}

/* Wichtige Artikel hervorheben */
.important-article {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.2);
}

.important-article:hover {
    box-shadow: 0 6px 12px rgba(255, 193, 7, 0.3);
}

.news-title {
    color: var(--vereins-blau);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.news-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.news-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Badge-Styles für Kategorien und Prioritäten */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0;
    font-weight: 500;
}

/* Vereins-Informationen Card */
.card {
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-body {
    padding: 1rem;
}

/* Filter-Buttons */
.btn-outline-secondary {
    transition: all 0.3s ease;
}

/* Vereins-News: Nächste Spiele (Mannschaftsportal) */
.news-matches-card {
    border: 1px solid #e5e7eb;
    border-left: 3px solid var(--vereins-blau);
    box-shadow: none;
}

.news-matches-card__header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
    text-align: left;
}

.news-matches-card__header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.news-matches-card__header.collapsed {
    border-bottom: none;
}

.news-matches-card__chevron {
    transition: transform 0.2s ease;
    color: var(--vereins-blau);
}

.news-matches-card__header[aria-expanded="true"] .news-matches-card__chevron {
    transform: rotate(180deg);
}

.news-matches-card__badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

.news-matches-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vereins-blau);
}

.news-matches-list .news-match-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
    border-color: #f1f5f9;
}

.news-match-item--today {
    background: #f0f7ff;
}

.news-match-item__main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    min-width: 0;
    flex: 1;
}

.news-match-item__when {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.news-match-item__title {
    color: #1e293b;
    font-weight: 500;
    min-width: 0;
}

.news-match-item__score {
    flex-shrink: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--vereins-blau);
    letter-spacing: 0.02em;
}

.news-match-item__ort {
    flex-shrink: 0;
    color: #64748b;
    font-size: 0.8125rem;
    text-decoration: none;
    min-width: 0;
    white-space: nowrap;
}

.news-match-item__ort i {
    margin-right: 0.25rem;
    opacity: 0.85;
}

.news-match-item__ort:hover {
    color: var(--vereins-blau);
    text-decoration: underline;
}

.news-match-item__fbd {
    flex-shrink: 0;
    color: #64748b;
    padding: 0.2rem 0.35rem;
    line-height: 1;
    text-decoration: none;
}

.news-match-item__fbd:hover {
    color: var(--vereins-blau);
}

/* Vereins-News: Filter einklappbar */
.news-filter-card__header {
    cursor: pointer;
    user-select: none;
}

.news-filter-card__header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.news-filter-card__chevron {
    transition: transform 0.2s ease;
    color: var(--vereins-blau);
}

.news-filter-card__header[aria-expanded="true"] .news-filter-card__chevron {
    transform: rotate(180deg);
}

.news-filter-card__badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .news-page-header h1 {
        font-size: 1.35rem;
    }

    .news-create-btn {
        flex-shrink: 0;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0;
    }

    .news-create-btn__icon {
        margin: 0 !important;
        font-size: 1.1rem;
    }

    .news-create-btn__label {
        display: none;
    }
}

@media (min-width: 992px) {
    .news-create-btn__icon {
        margin-right: 0.5rem;
    }
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Zusätzliche Rahmen-Regel für News-Artikel */
div.news-article {
    border: 3px solid #1e3a8a !important;
    box-shadow: 0 0 0 1px #1e3a8a !important;
}

div.news-article:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* Responsive Design für Vereins-Informationen */
@media (max-width: 768px) {
    .news-article {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Vereins-Informationen auf Mobile */
    .col-sm-6 {
        margin-bottom: 0.5rem;
    }
}

/* Action Buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0;
}

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

.btn-outline-primary:hover {
    background-color: var(--vereins-blau);
    border-color: var(--vereins-blau);
}

.btn-outline-danger {
    color: #dc2626;
    border-color: #dc2626;
}

.btn-outline-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

/* Formulare */
.form-control {
    border-radius: 0;
    border: 1px solid #d1d5db;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--vereins-blau-hell);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.input-group-text {
    background-color: var(--vereins-grau);
    border: 1px solid #d1d5db;
    color: var(--vereins-blau);
}

/* Alerts */
.alert {
    border-radius: 0;
    border: none;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Footer */
footer {
    background-color: var(--vereins-grau) !important;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news-article {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Icon Spacing */
.fas, .far, .fab {
    margin-right: 0.25rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--vereins-grau);
}

::-webkit-scrollbar-thumb {
    background: var(--vereins-blau-hell);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--vereins-blau);
}
