/* =========================================================
   WEBPANDA SHELL
   Header, navigation, logged-in topbar and footer.
   ========================================================= */

/* =========================================================
   WEBPANDA CLIENT AREA
   Header
   ========================================================= */

#header.header {
    background: var(--wp-dark);
    border: 0;
    box-shadow: none;
}

/* =========================================================
   Main Navbar
   ========================================================= */

#header .webpanda-navbar {
    min-height: 94px;
    padding: 0;
    background: var(--wp-dark);
    border: 0;
    box-shadow: none;
}

#header .webpanda-navbar > .container {
    display: flex;
    align-items: center;
        width: 100%;
    max-width: 1220px;
    padding-left: 15px;
    padding-right: 15px;
}

/* =========================================================
   Logo
   ========================================================= */

#header .webpanda-navbar .navbar-brand {
    display: flex;
    align-items: center;
    margin-right: 38px;
    padding: 0;
}

#header .webpanda-navbar .navbar-brand .logo-img {
    width: auto;
    max-width: none;
    height: 78px;
    max-height: 78px;
}

/* =========================================================
   Collapsible Navigation Area
   ========================================================= */

#header .webpanda-navbar .navbar-collapse {
    align-items: center;
}

/* =========================================================
   Primary Navigation
   ========================================================= */

#header .webpanda-primary-nav {
    display: flex;
    align-items: center;
}

#header .webpanda-primary-nav > li > a,
#header .webpanda-primary-nav > .nav-item > .nav-link {
    padding: 0 16px !important;
    color: var(--wp-white) !important;
    background: transparent !important;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    opacity: 1 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

#header .webpanda-primary-nav > li > a:hover,
#header .webpanda-primary-nav > li > a:focus,
#header .webpanda-primary-nav > .nav-item > .nav-link:hover,
#header .webpanda-primary-nav > .nav-item > .nav-link:focus,
#header .webpanda-primary-nav > .nav-item.active > .nav-link {
    color: var(--wp-green) !important;
    background: transparent !important;
}

/* =========================================================
   Right-side Actions
   ========================================================= */

#header .webpanda-navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================
   Cart
   ========================================================= */

#header .webpanda-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    background: transparent;
    color: var(--wp-white);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    font-size: 17px;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

#header .webpanda-cart:hover,
#header .webpanda-cart:focus {
    background: transparent;
    color: var(--wp-green);
    border-color: var(--wp-green);
    text-decoration: none;
    outline: none;
}

/* Cart item badge */

#header .webpanda-cart .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 2px 5px;
    background: var(--wp-green);
    color: var(--wp-dark);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* =========================================================
   Account Navigation
   ========================================================= */

#header .webpanda-account-nav {
    display: flex;
    align-items: center;
}

#header .webpanda-account-nav > li > a,
#header .webpanda-account-nav > .nav-item > .nav-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 20px !important;
    background: var(--wp-green) !important;
    color: var(--wp-dark) !important;
    border: 0 !important;
    border-radius: 10px !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

#header .webpanda-account-nav > li > a:hover,
#header .webpanda-account-nav > li > a:focus,
#header .webpanda-account-nav > .nav-item > .nav-link:hover,
#header .webpanda-account-nav > .nav-item > .nav-link:focus {
    background: var(--wp-green-hover) !important;
    color: var(--wp-dark) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* =========================================================
   Dropdown Menus
   ========================================================= */

#header .dropdown-menu {
    margin-top: 8px;
    padding: 8px;
    background: var(--wp-white);
    border: 1px solid var(--wp-border);
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

#header .dropdown-menu .dropdown-item {
    padding: 9px 12px;
    background: transparent !important;
    color: var(--wp-text) !important;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}

#header .dropdown-menu .dropdown-item:hover,
#header .dropdown-menu .dropdown-item:focus {
    background: rgba(141, 210, 0, 0.10) !important;
    color: var(--wp-dark) !important;
}

/* Dropdown dividers */

#header .dropdown-divider {
    border-top-color: var(--wp-border);
}

/* =========================================================
   Mobile Navigation Toggle
   ========================================================= */

#header .webpanda-navbar-toggler {
    margin-left: auto;
    padding: 8px 10px;
    background: transparent;
    color: var(--wp-white);
    border: 0;
    font-size: 20px;
    outline: none;
    box-shadow: none;
}

#header .webpanda-navbar-toggler:hover,
#header .webpanda-navbar-toggler:focus {
    background: transparent;
    color: var(--wp-green);
    outline: none;
    box-shadow: none;
}

/* =========================================================
   Tablet / Mobile
   ========================================================= */

@media (max-width: 1199px) {
    #header .webpanda-navbar {
        min-height: 78px;
        padding: 10px 0;
    }
    /* Logo */
    #header .webpanda-navbar .navbar-brand {
        margin-right: 0;
    }
    #header .webpanda-navbar .navbar-brand .logo-img {
        height: 62px;
        max-height: 62px;
    }
    /* Collapsed menu */
    #header .webpanda-navbar .navbar-collapse {
        padding: 18px 0 10px;
    }
    /* Main navigation */
    #header .webpanda-primary-nav {
        display: flex;
        align-items: stretch;
        width: 100%;
    }
    #header .webpanda-primary-nav > li > a,
    #header .webpanda-primary-nav > .nav-item > .nav-link {
        display: block;
        width: 100%;
        padding: 10px 0 !important;
        line-height: 1.4;
    }
    /* Right actions */
    #header .webpanda-navbar-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 0 6px;
    }
    /* Account */
    #header .webpanda-account-nav > li > a,
    #header .webpanda-account-nav > .nav-item > .nav-link {
        display: inline-flex !important;
    }
}

/* =========================================================
   Small Mobile
   ========================================================= */

@media (max-width: 575px) {
    #header .webpanda-navbar {
        padding: 8px 0;
    }
    #header .webpanda-navbar .navbar-brand .logo-img {
        height: 56px;
        max-height: 56px;
    }
    #header .webpanda-navbar-actions {
        flex-wrap: wrap;
    }
    #header .webpanda-account-nav > li > a,
    #header .webpanda-account-nav > .nav-item > .nav-link {
        padding: 10px 16px !important;
    }
}

/* =========================================================
   WEBPANDA FOOTER
   ========================================================= */

footer.footer.webpanda-footer {
    padding: 68px 0 24px;
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(141, 210, 0, 0.08),
            transparent 28%
        ),
        #000000;
    color: #FFFFFF;
    border: 0;
}

/* Width */

.webpanda-footer > .container {
    width: 100%;
    max-width: 1220px;
}

/* =========================================================
   Main Grid
   ========================================================= */

.webpanda-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 56px;
    padding-bottom: 52px;
}

/* =========================================================
   Brand
   ========================================================= */

.webpanda-footer-brand {
    max-width: 330px;
}

.webpanda-footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.webpanda-footer-logo img {
    width: auto;
    height: 76px;
    max-height: 76px;
}

.webpanda-footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.70);
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    line-height: 1.75;
}

/* =========================================================
   Footer Columns
   ========================================================= */

.webpanda-footer-column h4 {
    margin: 0 0 20px;
    color: #FFFFFF;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.webpanda-footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.webpanda-footer-column li {
    margin-bottom: 11px;
}

.webpanda-footer-column a {
    color: rgba(255, 255, 255, 0.70);
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.webpanda-footer-column a:hover,
.webpanda-footer-column a:focus {
    color: var(--wp-green);
    text-decoration: none;
}

/* =========================================================
   Bottom Row
   ========================================================= */

.webpanda-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.webpanda-footer-bottom p,
.webpanda-footer-bottom span {
    margin: 0;
    color: rgba(255, 255, 255, 0.56);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991px) {
    footer.footer.webpanda-footer {
        padding-top: 56px;
    }
    .webpanda-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 42px 36px;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {
    footer.footer.webpanda-footer {
        padding: 48px 0 22px;
    }
    .webpanda-footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
        padding-bottom: 38px;
    }
    .webpanda-footer-brand {
        max-width: none;
    }
    .webpanda-footer-logo img {
        height: 68px;
        max-height: 68px;
    }
    .webpanda-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

/* =========================================================
   WEBPANDA LOGGED-IN TOPBAR
   ========================================================= */

#header .topbar {
    min-height: 36px;
    background: #111418;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.55);
}

/* Match main header width */

#header .topbar > .container {
    width: 100%;
    max-width: 1220px;
}

/* General topbar buttons */

#header .topbar .btn {
    padding: 7px 10px;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.58);
    border: 0 !important;
    border-radius: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 500;
    box-shadow: none !important;
}

/* Notifications */

#header .topbar #accountNotifications {
    padding-left: 0;
}

#header .topbar #accountNotifications i {
    margin-right: 5px;
    color: var(--wp-green);
}

#header .topbar #accountNotifications:hover {
    color: #FFFFFF;
}

/* Logged in as prefix */

#header .topbar .active-client .input-group-text {
    padding: 7px 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.42);
    border: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
}

/* Client name */

#header .topbar .btn-active-client {
    color: rgba(255, 255, 255, 0.78) !important;
    text-decoration: none;
}

#header .topbar .btn-active-client:hover {
    color: var(--wp-green) !important;
}

/* Switch account icon */

#header .topbar .active-client .btn-group > .btn:not(.btn-active-client) {
    color: var(--wp-green);
}

#header .topbar .active-client .btn-group > .btn:not(.btn-active-client):hover {
    color: #FFFFFF;
}

/* Topbar links */

#header .topbar a {
    text-decoration: none !important;
}

/* Notifications popup */

#header #accountNotificationsContent .client-alerts {
    font-family: "Montserrat", sans-serif;
}

/* =========================================================
   WEBPANDA PASSWORD GENERATOR MODAL
   Shared WHMCS generate-password component
   ========================================================= */


/* =========================================================
   Modal Shell
   ========================================================= */

#modalGeneratePassword .modal-dialog {
    max-width: 620px;
}

#modalGeneratePassword .modal-content {
    overflow: hidden;

    background: #FFFFFF;

    border: 0;
    border-radius: 15px;

    box-shadow:
        0 22px 70px rgba(17, 20, 24, 0.24);
}


/* =========================================================
   Header
   ========================================================= */

#modalGeneratePassword .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 21px 24px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(118, 200, 0, 0.13),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #111418 0%,
            #171D1A 100%
        );

    border: 0;
}

#modalGeneratePassword .modal-title {
    margin: 0;

    color: #FFFFFF;

    font-family: "Montserrat", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

#modalGeneratePassword .close {
    margin: 0;
    padding: 0;

    color: rgba(255, 255, 255, 0.65);

    font-size: 22px;

    text-shadow: none;

    opacity: 1;
}

#modalGeneratePassword .close:hover,
#modalGeneratePassword .close:focus {
    color: var(--wp-green);

    outline: none;

    opacity: 1;
}


/* =========================================================
   Body
   ========================================================= */

#modalGeneratePassword .modal-body {
    padding: 28px 30px 26px;
}


/* =========================================================
   Form Layout
   ========================================================= */

/*
 * WHMCS uses old Bootstrap col-sm-4 / col-sm-8 markup here.
 * We deliberately flatten those columns and use a clean
 * stacked layout instead.
 */

#modalGeneratePassword .form-group {
    display: block;

    width: 100%;
    max-width: 410px;

    margin: 0 auto 24px;
}

/*
 * Give the second field proper breathing room.
 * WHMCS's original horizontal-form spacing is too tight here.
 */

#modalGeneratePassword
.form-group + .form-group {
    margin-top: 14px !important;
}

#modalGeneratePassword .form-group > label,
#modalGeneratePassword .form-group > div,
#modalGeneratePassword .form-group > [class*="col-"] {
    float: none;

    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;

    flex: none;
}


/* =========================================================
   Labels
   ========================================================= */

#modalGeneratePassword .control-label,
#modalGeneratePassword .col-form-label,
#modalGeneratePassword .form-group > label {
    display: block;

    width: 100%;

    margin: 0 0 7px;
    padding: 0;

    color: #555D63;

    font-family: "Montserrat", sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;

    text-align: left;
}


/* =========================================================
   Inputs
   ========================================================= */

#modalGeneratePassword .form-control {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 41px;

    padding: 0 12px;

    background: #FFFFFF;

    color: #30353A;

    border: 1px solid #DDE1E4;
    border-radius: 8px;

    font-family: "Montserrat", sans-serif;
    font-size: 11px;

    box-sizing: border-box;

    box-shadow: none;
}

#modalGeneratePassword .form-control:focus {
    border-color: var(--wp-green);

    outline: none;

    box-shadow:
        0 0 0 3px rgba(118, 200, 0, 0.10);
}


/* Password length remains compact */

#modalGeneratePassword
#inputGeneratePasswordLength {
    width: 105px;
    max-width: 105px;
}


/* Generated password fills the available width */

#modalGeneratePassword
#inputGeneratePasswordOutput {
    width: 100%;
    max-width: 100%;
}


/* =========================================================
   Generator Controls
   ========================================================= */

#modalGeneratePassword .modal-body > .row {
    width: 100%;
    max-width: 410px;

    margin: 3px auto 0;
}

#modalGeneratePassword .modal-body > .row > div,
#modalGeneratePassword .modal-body > .row > [class*="col-"] {
    display: flex;

    float: none;

    flex-wrap: wrap;

    gap: 7px;

    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;

    flex: none;
}


/* =========================================================
   Neutral Buttons
   ========================================================= */

#modalGeneratePassword .btn-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    min-height: 37px;

    padding: 0 12px;

    background: #FFFFFF;

    color: #555D63;

    border: 1px solid #D9DEE2;
    border-radius: 8px;

    font-family: "Montserrat", sans-serif;
    font-size: 9px;
    font-weight: 700;

    box-shadow: none;
}

#modalGeneratePassword .btn-default:hover,
#modalGeneratePassword .btn-default:focus {
    background: #F8FCEE;

    color: #4D7700;

    border-color:
        rgba(118, 200, 0, 0.50);

    outline: none;

    box-shadow: none;
}

/*
 * The footer button already copies the generated password
 * and inserts it into the requested password fields.
 * The separate Copy button is therefore redundant.
 */

#modalGeneratePassword .copy-to-clipboard {
    display: none !important;
}


/* =========================================================
   Error
   ========================================================= */

#modalGeneratePassword
#generatePwLengthError {
    width: 100%;
    max-width: 410px;

    margin: 0 auto 20px;
    padding: 13px 15px;

    background: #FFF2F3;

    color: #A8424C;

    border: 1px solid #E9D7D9;
    border-radius: 9px;

    font-family: "Montserrat", sans-serif;
    font-size: 9px;
    line-height: 1.55;
}


/* =========================================================
   Footer
   ========================================================= */

#modalGeneratePassword .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    padding: 17px 24px;

    background: #FAFBFB;

    border-top: 1px solid #ECEEEF;
}

#modalGeneratePassword
#btnGeneratePasswordInsert {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;

    padding: 0 15px;

    background: var(--wp-green);

    color: #111418;

    border: 1px solid var(--wp-green);
    border-radius: 8px;

    font-family: "Montserrat", sans-serif;
    font-size: 9px;
    font-weight: 700;

    box-shadow: none;
}

#modalGeneratePassword
#btnGeneratePasswordInsert:hover,
#modalGeneratePassword
#btnGeneratePasswordInsert:focus {
    background: var(--wp-green-hover);

    color: #111418;

    border-color: var(--wp-green-hover);

    outline: none;

    box-shadow: none;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 575px) {

    #modalGeneratePassword .modal-dialog {
        margin: 8px;
    }

    #modalGeneratePassword .modal-header {
        padding: 19px;
    }

    #modalGeneratePassword .modal-title {
        font-size: 16px;
    }

    #modalGeneratePassword .modal-body {
        padding: 22px 20px;
    }

    #modalGeneratePassword .form-group {
        max-width: none;

        margin-bottom: 18px;
    }

    #modalGeneratePassword
    #inputGeneratePasswordLength {
        width: 100%;
        max-width: none;
    }

    #modalGeneratePassword .modal-body > .row {
        max-width: none;

        margin-top: -3px;
    }

    #modalGeneratePassword .modal-body > .row .btn {
        flex: 1 1 auto;
    }

    #modalGeneratePassword .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;

        padding: 15px 20px;
    }

    #modalGeneratePassword .modal-footer .btn {
        width: 100%;
    }

}
