/*
 * Habcity presentation theme inspired by Wave RP's visual language.
 * This file intentionally overrides presentation only; existing markup,
 * routes, forms and application behaviour remain unchanged.
 */

:root {
    --wave-page: #4474bd;
    --wave-sky: #20a2cf;
    --wave-panel: #1f9fc5;
    --wave-panel-deep: #174f8e;
    --wave-panel-dark: #123f75;
    --wave-line: #20b9d5;
    --wave-green: #05aa59;
    --wave-green-light: #19cf73;
    --wave-red: #ef4548;
    --wave-orange: #ff7015;
    --wave-yellow: #dfc51d;
    --wave-text: #ffffff;
    --wave-muted: #d8e9f8;
    --wave-ink: #214c72;
    --wave-white: #ffffff;
}

html,
body {
    min-height: 100%;
    height: auto;
    font-family: "Ubuntu", Arial, sans-serif;
    color: var(--wave-text);
    background: var(--wave-page) !important;
}

body {
    letter-spacing: 0.01em;
}

.container {
    width: 100%;
    max-width: 1120px;
    padding-right: 16px;
    padding-left: 16px;
}

#page-wrap {
    min-width: 0;
    padding-bottom: 74px;
}

/* Panorama and primary action */
.header {
    min-height: 145px;
    background-color: var(--wave-sky);
    background-image:
        linear-gradient(90deg, rgba(22, 158, 201, 0.04), rgba(16, 91, 157, 0.2)),
        url("../img/backgrounds/header-l_v2.png");
    background-repeat: no-repeat;
    background-position: center 34%;
    background-size: cover;
    border: 0;
    box-shadow: none;
}

.header .container > .row {
    min-height: 145px;
    margin-bottom: 0 !important;
}

.header .col > div {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    flex: 0 0 360px;
    width: 360px;
    height: 128px;
    margin: 0;
    background-position: left center;
    filter: drop-shadow(0 4px 0 rgba(0, 48, 86, 0.38));
}

.logo:hover,
.enter-peak:hover,
#main-logo:hover,
#subrmit-login:hover,
#show-register:hover {
    animation: none;
}

.enter-peak {
    flex: 0 0 auto;
    padding: 0 !important;
}

.enter-peak .button {
    min-width: 210px;
    padding: 15px 24px;
    text-transform: none;
}

/* White navigation bar */
.navigation {
    position: relative;
    z-index: 30;
    min-height: 62px;
    background: var(--wave-white);
    border-bottom: 3px solid var(--wave-line);
    box-shadow: none;
}

.navigation .container {
    min-height: 59px;
    justify-content: center !important;
}

.pixel-wrapper {
    flex: 0 0 74px;
    width: 74px;
    height: 104px;
    margin: -45px 2px 0 -2px;
}

.pixel-wrapper .pixel {
    max-width: 100%;
}

.nav-button > a {
    padding: 20px 16px;
    color: var(--wave-ink);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-shadow: none;
}

.nav-button > a:hover,
.nav-button:hover > a,
.nav-button > a:focus {
    color: #147ca8;
    text-decoration: none;
}

.nav-button > a .nav-button-text::before {
    bottom: -9px;
    height: 3px;
    background: var(--wave-line);
    box-shadow: none;
}

.dropdown-content {
    width: 220px;
    padding: 8px;
    text-align: left;
    background: var(--wave-white);
    border: 3px solid var(--wave-line);
    border-top: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 18px rgba(15, 53, 99, 0.22);
}

.dropdown-content a {
    padding: 9px 11px;
    color: var(--wave-ink);
    border-radius: 3px;
}

.dropdown-content a:hover {
    color: #124f7e;
    background: #e7f7fb;
}

/* Page content and cards */
.content {
    margin: 16px 0 0;
}

.content-box,
.profile-box,
.staff-member,
.online-user {
    overflow: hidden;
    color: var(--wave-text);
    background: var(--wave-panel);
    border: 3px solid var(--wave-line);
    border-radius: 4px;
    box-shadow: none;
}

/* Preserve the online-list role indicators after the generic card theme. */
.online-user.online-user-vip {
    background-color: #000000a6;
    background-image: url("../img/icons/vip_icon.png");
    background-repeat: no-repeat;
    background-position: top right;
    border-bottom-color: #152025;
}

.online-user.online-user-staff {
    background-color: #310909;
    background-image: url("../img/icons/staff_icon.png");
    background-repeat: no-repeat;
    background-position: top right;
    border-bottom-color: #830202;
}

.content-box {
    margin-bottom: 12px;
}

.content-box .title {
    min-height: 42px;
    padding: 10px 14px;
    color: var(--wave-text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    text-shadow: none;
    background: var(--wave-panel-deep);
    border-radius: 0;
}

.content-box .box-content {
    padding: 10px;
}

.content .row > [class*="col-"]:first-child .content-box:first-child .title {
    background: var(--wave-red);
}

.content .row > [class*="col-"]:nth-child(2) .content-box:nth-child(2) .title {
    background: var(--wave-green);
}

.content-box .sub-title,
.peakrp-news {
    text-shadow: none;
}

.user-pz-stats,
.latest-post,
.thread,
.profile-level-box {
    color: var(--wave-text);
    background: var(--wave-panel-deep);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.user-pz-stats:hover,
.latest-post:hover {
    background: var(--wave-panel-dark);
}

.news-item {
    width: 100%;
    max-width: 100%;
    border: 3px solid var(--wave-line);
    border-radius: 4px;
    box-shadow: none;
}

.news-title,
.news-stats {
    background: rgba(18, 63, 117, 0.92);
}

/* Controls */
.button,
.btn {
    border-radius: 3px;
    font-weight: 700;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.button {
    margin: 0.35rem 0;
    padding: 0.55rem 1rem;
    border: 3px solid;
}

.button.green,
.button.blue,
.btn-success {
    color: #fff !important;
    background: var(--wave-green);
    border-color: var(--wave-green-light);
}

.button.green:hover,
.button.blue:hover,
.btn-success:hover {
    background: #079b53;
    border-color: #43dd91;
}

.button.turq,
.btn-primary {
    background: #1c79c5;
    border-color: #39a6e4;
}

.button.teal,
.btn-info {
    background: var(--wave-panel-deep);
    border-color: #2c79bc;
}

.form-control,
.custom-select {
    min-height: 42px;
    color: #234a70;
    background: #f7fbff;
    border: 2px solid #b7d7ec;
    border-radius: 3px;
    box-shadow: none;
}

.form-control:focus,
.custom-select:focus {
    color: #173c60;
    background: #fff;
    border-color: var(--wave-line);
    box-shadow: 0 0 0 3px rgba(32, 185, 213, 0.2);
}

.table {
    color: var(--wave-text);
}

.table thead th {
    color: var(--wave-text);
    background: var(--wave-panel-deep);
    border-color: rgba(255, 255, 255, 0.15);
}

.table td,
.table th {
    border-color: rgba(255, 255, 255, 0.15);
}

.modal-content {
    color: var(--wave-text);
    background: var(--wave-panel);
    border: 3px solid var(--wave-line);
    border-radius: 4px;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.16);
}

.alert {
    border: 0;
    border-radius: 4px;
    font-weight: 700;
}

.alert-danger,
.notice.red {
    color: #fff;
    background: #d93642;
}

/* Footer */
.footer {
    min-height: 58px;
    margin-top: 30px;
    padding: 18px 0;
    color: var(--wave-text);
    background: var(--wave-panel-deep);
    border: 0;
}

.footer a {
    color: var(--wave-muted);
}

.footer a:hover {
    color: #fff;
}

/* Login and registration retain their existing handlers and field ids. */
body.habcity-auth {
    position: relative;
    min-height: 100vh;
    color: var(--wave-text);
    background: var(--habcity-indigo) !important;
}

.habcity-auth > .d-flex:first-of-type {
    min-height: 174px;
    margin-top: 0 !important;
    justify-content: flex-start !important;
    width: min(1120px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

.habcity-auth > .d-flex.justify-content-center,
.habcity-auth > .d-flex.justify-content-center > center {
    width: 100%;
    justify-content: center !important;
}

.habcity-auth #main-logo {
    width: 360px;
    max-width: 62vw;
    filter: drop-shadow(0 4px 0 rgba(0, 48, 86, 0.38));
    animation: none;
}

.habcity-auth .login {
    min-width: 380px;
    padding: 22px;
    color: var(--wave-text);
    background: var(--wave-panel);
    border: 3px solid var(--wave-line);
    border-top: 42px solid var(--wave-panel-deep);
    border-radius: 4px;
    box-shadow: none;
}

.habcity-auth .login::before {
    display: block;
    margin: -54px 0 23px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    content: "Bienvenido a Habcity";
}

.habcity-auth .form-control {
    display: block;
    width: 100%;
    margin-right: 0;
    color: #234a70;
    background: #f7fbff;
    border: 2px solid #b7d7ec;
}

.habcity-auth .button.w-100 {
    display: block;
    width: 100% !important;
}

.habcity-auth .form-control:focus {
    border-color: var(--wave-line);
    box-shadow: 0 0 0 3px rgba(32, 185, 213, 0.2);
}

.habcity-auth a:not(.button) {
    color: #fff;
}

@media (max-width: 991.98px) {
    .header,
    .header .container > .row {
        min-height: 128px;
    }

    .logo {
        flex-basis: 290px;
        width: 290px;
        height: 108px;
    }

    .enter-peak .button {
        min-width: 180px;
    }

    .navigation .container {
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .pixel-wrapper {
        display: none;
    }

    .nav-button > a {
        padding: 15px 10px;
    }

    .content .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .content {
        margin-left: 0;
    }

    iframe {
        max-width: 100%;
    }

    .footer {
        position: static;
    }

    #page-wrap {
        padding-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .header .col > div {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .header,
    .header .container > .row {
        min-height: 188px;
    }

    .logo {
        flex: 0 0 104px;
        width: min(300px, 80vw);
        height: 104px;
        background-position: center;
    }

    .enter-peak .button {
        min-width: min(270px, 80vw);
        margin: 0;
        padding: 10px 18px;
    }

    .navigation .container {
        padding: 6px 8px;
    }

    .nav-button {
        flex: 1 1 50%;
        text-align: center;
    }

    .nav-button > a {
        padding: 10px 5px;
        font-size: 12px;
    }

    .dropdown-content {
        left: 50%;
        width: min(230px, 92vw);
        transform: translateX(-50%);
    }

    .footer .container {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .habcity-auth > .d-flex:first-of-type {
        min-height: 152px;
        justify-content: center !important;
    }

    .habcity-auth #main-logo {
        max-width: 82vw;
    }

    .habcity-auth .login {
        min-width: 0;
        width: calc(100vw - 32px);
        padding: 18px;
    }
}
