/* =========================================================
   Ubie Websites – WordPress Admin Branding (LOCAL)
   v1.5.2 – Improved login styling + existing tweaks
   ========================================================= */

/* Base dark background for admin */
#adminmenu,
#adminmenu .wp-submenu,
#adminmenuback,
#adminmenuwrap {
    background-color: #090909 !important;
}

/* Top admin bar */
#wpadminbar,
#wpadminbar .menupop .ab-sub-wrapper,
#wpadminbar .quicklinks .ab-sub-wrapper {
    background-color: #090909 !important;
}

/* Menu text */
#adminmenu a,
#adminmenu .wp-submenu a {
    color: #f5f5f5 !important;
}

/* Remove left borders */
#adminmenu .wp-submenu,
#adminmenu li,
#adminmenu a,
#adminmenu li.menu-top {
    border-left: none !important;
}

/* Default icon colour */
#adminmenu div.wp-menu-image:before,
#adminmenu li a .wp-menu-image:before,
#adminmenu [style*="#72aee6"] {
    color: #f5f5f5 !important;
}

/* Main menu active / hover */
#adminmenu li.menu-top:hover > a.menu-top,
#adminmenu li.menu-top > a.menu-top:focus,
#adminmenu li.wp-has-current-submenu > a.wp-has-current-submenu,
#adminmenu li.current a.menu-top,
#adminmenu .wp-menu-open > a.menu-top {
    background-color: #f0ba1f !important;
    color: #090909 !important;
}

/* Icons when main item active / hover */
#adminmenu li.menu-top:hover div.wp-menu-image:before,
#adminmenu li.menu-top:focus div.wp-menu-image:before,
#adminmenu li.current div.wp-menu-image:before,
#adminmenu li.wp-has-current-submenu div.wp-menu-image:before,
#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before,
#adminmenu .wp-menu-open div.wp-menu-image:before {
    color: #090909 !important;
}

/* Submenu hover/current – text only */
#adminmenu .wp-submenu a:hover {
    color: #f0ba1f !important;
    background-color: transparent !important;
}

#adminmenu .wp-submenu li.current a,
#adminmenu .wp-submenu li.current a:hover {
    color: #f0ba1f !important;
    background-color: transparent !important;
}

/* Arrow indicator colour */
ul#adminmenu a.wp-has-current-submenu:after,
ul#adminmenu > li.current > a.current:after {
    border-right-color: #000000 !important;
}

/* Collapse menu button hover */
#collapse-button:hover,
#collapse-button:focus {
    color: #f0ba1f !important;
}

/* Buttons */
.wp-core-ui .button-primary,
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus,
.wp-core-ui .button-primary:active {
    background-color: #f0ba1f !important;
    border-color: #f0ba1f !important;
    color: #090909 !important;
}

/* Admin bar hover */
#wpadminbar .ab-item:hover,
#wpadminbar .ab-item:focus,
#wpadminbar .ab-item.ab-item-active {
    background-color: #f0ba1f !important;
    color: #090909 !important;
}

/* Notices */
.notice.notice-info,
.notice.notice-info p {
    background-color: #f0ba1f !important;
    border-left-color: #f0ba1f !important;
    color: #090909 !important;
}

/* Admin bar site name */
#wpadminbar #wp-admin-bar-site-name > .ab-item {
    color: #f5f5f5 !important;
    display: flex;
    align-items: center;
}

#wpadminbar #wp-admin-bar-site-name > .ab-item::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    background-image: url("../ubie-logo.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Hide WP logo */
#wpadminbar #wp-admin-bar-wp-logo {
    display: none !important;
}

/* =========================================================
   LOGIN PAGE STYLING
   ========================================================= */

body.login {
    background-color: #090909 !important;
}

/* Replace WP logo with Ubie logo */
body.login #login h1 a {
    background-image: url("https://ubiewebsites.co.uk/wp-content/uploads/2025/01/ubie-websites-small-business-website-design-logo-publish.svg") !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    width: 260px !important;
    height: 80px !important;
    margin-bottom: 20px !important;
}

/* Login form container */
body.login #login {
    padding-top: 60px;
}

/* Login form card */
body.login #loginform {
    background: #111111 !important;
    border-radius: 8px !important;
    border: 1px solid #1f1f1f !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6) !important;
    padding: 26px 26px 30px !important;
}

/* Labels & small text */
body.login label {
    color: #f5f5f5 !important;
}

body.login #nav a,
body.login #backtoblog a {
    color: #f0ba1f !important;
}

body.login #nav a:hover,
body.login #nav a:focus,
body.login #backtoblog a:hover,
body.login #backtoblog a:focus {
    color: #ffffff !important;
}

/* Inputs */
body.login .input,
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    background-color: #0b0b0b !important;
    border: 1px solid #333333 !important;
    color: #f5f5f5 !important;
    box-shadow: none !important;
}

body.login .input:focus,
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #f0ba1f !important;
    box-shadow: 0 0 0 1px #f0ba1f !important;
}

/* Remember me checkbox label */
body.login .forgetmenot label {
    color: #f5f5f5 !important;
}

/* Language switcher select */
body.login .language-switcher select {
    background-color: #0b0b0b !important;
    border: 1px solid #333333 !important;
    color: #f5f5f5 !important;
}

/* =========================================================
   CUSTOM DASHBOARD WIDGET STYLES
   ========================================================= */

.ubie-dashboard-widget {
    padding: 4px 0;
}

.ubie-dashboard-actions {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ubie-dashboard-actions li {
    margin-bottom: 8px;
}

.ubie-dashboard-actions li:last-child {
    margin-bottom: 0;
}

.ubie-dashboard-link {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    background-color: #090909;
    color: #f5f5f5;
    text-decoration: none;
    border: 1px solid #1f1f1f;
}

.ubie-dashboard-link:hover,
.ubie-dashboard-link:focus {
    background-color: #f0ba1f;
    color: #090909;
    border-color: #f0ba1f;
}

/* Counts underneath dashboard links */
.ubie-dashboard-count-line {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.85;
}

.ubie-dashboard-count-number {
    font-weight: 600;
    margin-right: 3px;
}

.ubie-dashboard-count-label {
    font-weight: 400;
}

/* Hide ONLY the 'Welcome' checkbox in Screen Options */
#screen-options-wrap input[value="welcome-panel"],
#screen-options-wrap label[for="welcome-panel-hide"] {
    display: none !important;
}

/* Remove button focus glow */
.wp-core-ui .button:focus {
    box-shadow: none !important;
}

/* =========================================================
   v1.5.4 – Login heading + lost password polish
   (keeps all previous admin styling intact)
   ========================================================= */

/* Heading under logo on all login-related screens */
.ubie-login-heading {
    padding-top: 20px;
    padding-bottom: 5px;
    text-align: center;
    color: #f5f5f5;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
}

/* Slightly tighter gap under logo */
body.login #login h1 a {
    margin-bottom: 10px !important;
}

/* Make lost password form match the login card */
body.login #loginform,
body.login #lostpasswordform {
    background: #111111 !important;
    border-radius: 8px !important;
    border: 1px solid #1f1f1f !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6) !important;
    padding: 26px 26px 30px !important;
}

/* Branded notice / success boxes on login & reset screens */
body.login .message,
body.login .success {
    background-color: #f0ba1f !important;
    border-left: none !important;
    color: #090909 !important;
    border-radius: 6px !important;
    padding: 14px 16px !important;
    margin-bottom: 18px !important;
}

/* Fix admin bar home/site icon on small screens */
@media (max-width: 782px) {
    #wpadminbar #wp-admin-bar-site-name > .ab-item::before {
        display: none !important;
    }
}
