/* ===================================================
   No Limit Gefle — Site Stylesheet
   A Nordic poker club: serious, clean, blue heritage
   =================================================== */

:root {
    --nlg-blue:        #337ab7;
    --nlg-blue-dark:   #2a6496;
    --nlg-blue-deeper: #1e4f78;
    --nlg-blue-light:  #4a9ad4;
    --nlg-gradient-top:#3c7faf;
    --nlg-gradient-bot:#d5dde5;
    --nlg-red:         #cc0000;
    --nlg-green:       #00bb00;
    --nlg-white:       #ffffff;
    --nlg-body-text:   #333333;
    --nlg-muted:       #6c757d;
    --nlg-border:      #dee2e6;
    --nlg-card-radius: 4px;
}

/* ---- Base ---- */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html { font-size: 15px; }
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--nlg-body-text);
    background: linear-gradient(175deg, var(--nlg-gradient-top) 0%, var(--nlg-gradient-bot) 45%, #ededed 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* ---- White container floating above gradient ---- */
.site-container {
    background: var(--nlg-white);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
    min-height: calc(100vh - 20px);
    padding-left: 0;
    padding-right: 0;
}

@media (min-width: 992px) {
    .site-container {
        border-left: none;
        border-right: none;
    }
}

/* ---- Top Brand Bar (blue) ---- */
.brand-bar {
    background: var(--nlg-blue);
    padding: 0.5rem 0;
    color: #fff;
}

.brand-bar a {
    color: #fff;
    text-decoration: none;
}

.brand-bar .brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-bar .brand-title:hover {
    opacity: 0.9;
}

.brand-bar .user-info {
    font-size: 0.85rem;
    opacity: 0.9;
}

.brand-bar .user-info a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.brand-bar .user-info a:hover {
    opacity: 0.8;
}

/* ---- Navigation Bar (lighter) ---- */
.nav-bar {
    background: #f5f7f9;
    border-bottom: 2px solid var(--nlg-blue);
    padding: 0;
}

.nav-bar .navbar {
    padding: 0;
    min-height: auto;
}

.nav-bar .nav-link {
    color: var(--nlg-body-text);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 0.85rem;
    transition: background-color 0.15s, color 0.15s;
    border-radius: 0;
}

.nav-bar .nav-link:hover,
.nav-bar .nav-link:focus {
    background-color: var(--nlg-blue);
    color: #fff;
}

.nav-bar .nav-link.active {
    background-color: var(--nlg-blue);
    color: #fff;
}

.nav-bar .navbar-toggler {
    border-color: var(--nlg-blue);
    margin: 0.35rem 0;
}

.nav-bar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23337ab7' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-bar .toggler-label {
    color: var(--nlg-blue);
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.4rem;
}

/* ---- Content area ---- */
.content-area {
    padding: 1.25rem 1rem;
}

@media (min-width: 768px) {
    .content-area {
        padding: 1.5rem;
    }
}

/* ---- Cards (panel-primary equivalent) ---- */
.card {
    border-radius: var(--nlg-card-radius);
    border: 1px solid var(--nlg-border);
    overflow: hidden;
}

.card-header {
    background-color: var(--nlg-blue);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 0.85rem;
    border-bottom: none;
    border-radius: 0;
}

/* ---- Tables ---- */
.table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--nlg-muted);
    border-bottom-width: 2px;
}

.table a {
    color: var(--nlg-blue);
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
    color: var(--nlg-blue-dark);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: rgba(51, 122, 183, 0.04);
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(51, 122, 183, 0.08);
}

/* ---- Membership Badges ---- */
.badge.text-bg-success,
.badge-member {
    background-color: var(--nlg-green) !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2em 0.5em;
    vertical-align: middle;
    border-radius: 3px;
}

.badge.text-bg-secondary {
    background-color: var(--nlg-red) !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2em 0.5em;
    vertical-align: middle;
    border-radius: 3px;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--nlg-blue);
    border-color: var(--nlg-blue);
}

.btn-primary:hover {
    background-color: var(--nlg-blue-dark);
    border-color: var(--nlg-blue-dark);
}

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

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

/* ---- Pagination ---- */
.pagination {
    flex-wrap: wrap;
    gap: 0.15rem;
}

.page-link {
    color: var(--nlg-blue);
    font-size: 0.85rem;
}

.page-item.active .page-link {
    background-color: var(--nlg-blue);
    border-color: var(--nlg-blue);
}

/* ---- Player image ---- */
.img-thumbnail {
    max-height: 200px;
    border-radius: var(--nlg-card-radius);
}

/* ---- Race table: line after 5th place ---- */
.race-table tbody tr:nth-child(5) {
    border-bottom: 3px solid #777;
}

/* ---- Footer ---- */
.site-footer {
    background-color: #f5f7f9;
    border-top: 2px solid var(--nlg-blue);
    padding: 1rem 0;
    font-size: 0.82rem;
    color: var(--nlg-muted);
    text-align: center;
}

/* ---- Headings in content ---- */
h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--nlg-blue-deeper);
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--nlg-blue);
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nlg-body-text);
}

/* ---- Guestbook entries ---- */
.guestbook-entry {
    background: #f5f5f5;
    border: 1px solid #d4d4d4;
    border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
}

.guestbook-entry .card-body {
    padding: 0.7rem 0.9rem;
}

.guestbook-entry .guestbook-header {
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
}

div.guestbook-entry .guestbook-header a,
div.guestbook-entry .guestbook-header a:link,
div.guestbook-entry .guestbook-header a:visited {
    color: var(--nlg-body-text);
    font-weight: 600;
    text-decoration: none;
}

div.guestbook-entry .guestbook-header a:hover {
    color: var(--nlg-blue-dark);
    text-decoration: underline;
}

.guestbook-photo .player-thumb {
    width: 75px;
    height: auto;
    max-height: 100px;
    object-fit: cover;
    border: 1px solid #bbb;
}

.guestbook-photo .player-thumb-placeholder {
    width: 75px;
    height: 75px;
    background: #ddd;
    border: 1px solid #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #999;
}

.guestbook-message {
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: break-word;
    padding-top: 0.15rem;
}

.guestbook-message .smiley {
    font-size: 1.2em;
    vertical-align: middle;
}

/* ---- Smiley Picker ---- */
.smiley-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    background: #f8f9fa;
    border: 1px solid var(--nlg-border);
    border-radius: var(--nlg-card-radius);
}

.smiley-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 3px 4px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.15s;
}

.smiley-btn:hover {
    background: #e2e6ea;
    border-color: #ced4da;
}

/* ---- Alerts ---- */
.alert {
    border-radius: var(--nlg-card-radius);
    font-size: 0.9rem;
}

/* ---- Right column spacing ---- */
#rightColumn .card {
    margin-bottom: 1rem;
}

#rightColumn .table {
    font-size: 0.85rem;
}

/* ---- Forms ---- */
.form-control:focus {
    border-color: var(--nlg-blue-light);
    box-shadow: 0 0 0 0.2rem rgba(51, 122, 183, 0.25);
}

/* ---- Admin specifics ---- */
.admin-badge {
    font-size: 0.7rem;
    background: var(--nlg-blue-deeper);
    color: #fff;
    padding: 0.15em 0.5em;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* ---- News items ---- */
.news-item {
    border-bottom: 1px solid var(--nlg-border);
    padding-bottom: 1.25rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item-header {
    background: #eef3f7;
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--nlg-blue-deeper);
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--nlg-border);
}

.news-item-body {
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ---- Rankingetta ---- */
.rankingetta-photo {
    width: 90px;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    border: 1px solid #bbb;
    border-radius: 3px;
}

/* ---- Login page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    background: var(--nlg-white);
    border-radius: 6px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
}

.login-fields {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.login-fields .form-control {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.login-fields .form-control:first-child {
    border-bottom: 1px solid #ccc;
}

.login-fields .form-control:focus {
    box-shadow: none;
    background-color: #f8f9fa;
}

.login-btn {
    background-color: var(--nlg-blue-deeper);
    border-color: var(--nlg-blue-deeper);
    font-size: 1.1rem;
    padding: 0.65rem;
    font-weight: 600;
}

.login-btn:hover {
    background-color: var(--nlg-blue-dark);
    border-color: var(--nlg-blue-dark);
}

/* ---- Responsive helpers ---- */
@media (max-width: 767.98px) {
    .content-area {
        padding: 1rem 0.75rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .table {
        font-size: 0.82rem;
    }
}
