/**
 * Login Page Styles - servicesHub
 * 
 * Stili specifici per la pagina di login.
 * Migrato da designLibrary a Bootstrap 5.
 */

/* ===========================================
   CSS Variables (NIQ Brand Colors)
   =========================================== */
:root {
    --niq-bright-blue: #2d6df6;
    --niq-deep-blue: #0a1628;
    --niq-white: #ffffff;
    --niq-light-gray: #f5f5f5;
    --niq-black: #262626;
}

/* ===========================================
   Base Styles
   =========================================== */
html.white {
    background-color: var(--niq-white);
    height: 100%;
}

body {
    color: var(--niq-white) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#app > .container-md {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 60px; /* Spazio per il footer fisso */
}

/* ===========================================
   Background
   =========================================== */
.has-img-back-ground {
    background: url('../img/bg-login.png');
    background-size: cover;
    background-position: center;
}

/* ===========================================
   Login Main Content Layout
   =========================================== */
.wp-block-columns.has-img-back-ground {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
    border-radius: 12px;
}

.wp-block-columns.has-img-back-ground > .col-sm-6:first-of-type {
    /* Colonna sinistra - testo */
    padding-right: 30px;
}

.wp-block-columns.has-img-back-ground > .col-lg-6 {
    /* Colonna destra - form */
    display: flex;
    justify-content: center;
    align-items: center;
}

.has-deep-blue-background-color {
    background-color: var(--niq-deep-blue);
}

.has-white-background-color {
    background-color: var(--niq-white);
}

.has-black-background-color {
    background-color: var(--niq-black);
}

.has-bright-blue-background-color {
    background-color: var(--niq-bright-blue);
}

/* ===========================================
   Text Colors
   =========================================== */
.has-deep-blue-text-color {
    color: var(--niq-deep-blue);
}

.text-white {
    color: var(--niq-white) !important;
}

/* ===========================================
   Typography
   =========================================== */
.has-h-1-font-size {
    font-size: 2.5rem;
    line-height: 1.2;
}

.has-h-3-font-size {
    font-size: 1.75rem;
    line-height: 1.3;
}

.has-text-large-body-font-size {
    font-size: 1.125rem;
    line-height: 1.6;
}

.has-text-align-justify {
    text-align: justify;
}

/* ===========================================
   Form Styles
   =========================================== */
.form-control:focus {
    color: #495057;
    background-color: var(--niq-white);
    border-color: var(--niq-bright-blue);
    outline: 0;
    box-shadow: 0 0 0 0.1rem var(--niq-bright-blue);
}

/* ===========================================
   Buttons
   =========================================== */
button,
.button-primary {
    display: block;
    width: 100%;
    height: 50px;
    line-height: 36px;
    padding: 0 15px;
    border: 0 !important;
    border-radius: 2px;
    font-size: 18px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background: var(--niq-bright-blue) !important;
    color: var(--niq-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:focus,
button:hover,
.button-primary:hover {
    background: #0a52ed !important;
    color: var(--niq-white) !important;
}

/* ===========================================
   Login Form Container
   =========================================== */
#loginFormContent {
    min-width: 270px;
    max-width: 25%;
    width: max-content;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 576px) {
    #loginFormContent {
        min-width: 378px;
    }
}

/* ===========================================
   WP Block Styles (legacy compatibility)
   =========================================== */
.wp-block-group {
    padding: 0;
}

.wp-block-group__inner-container {
    max-width: 100%;
}

.wp-block-spacer {
    height: 0; /* Rimosso per centratura verticale */
    display: none;
}

.wp-block-niq-blocks-nlsn-niq-login {
    padding: 0;
}

/* ===========================================
   Header
   =========================================== */
.header {
    padding: 20px 0;
}

.header svg {
    max-width: 190px;
    height: auto;
}

/* ===========================================
   Footer
   =========================================== */
.nielsen-footer {
    color: var(--niq-white);
    font-size: 13px;
    background-color: var(--niq-bright-blue);
    width: 100%;
    display: flex;
    text-align: center;
    position: fixed;
    bottom: 0;
    z-index: 100;
}

.nielsen-footer span {
    margin-left: 100px;
    padding: 10px;
}

@media only screen and (max-width: 480px) {
    .nielsen-footer span {
        margin-left: 10px !important;
        font-size: 11px;
    }
}

.nielsen-footer span a {
    color: var(--niq-white) !important;
    cursor: pointer;
    text-decoration: none;
}

.nielsen-footer span a:hover {
    text-decoration: underline;
}

/* ===========================================
   Auth Footer (forgot password link)
   =========================================== */
.auth-footer {
    text-align: center;
    font-size: 14px !important;
    padding-top: 28px !important;
    padding-bottom: 10px !important;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    min-width: max-content !important;
}

.auth-footer a {
    color: var(--niq-black) !important;
    padding-bottom: 2px !important;
    border-bottom: 1px solid var(--niq-black) !important;
    text-decoration: none !important;
    width: max-content;
    max-width: 100%;
}

.auth-footer a:focus {
    box-shadow: none !important;
}

.auth-footer a:active,
.auth-footer a:hover {
    border-bottom: 1px solid var(--niq-black) !important;
    color: var(--niq-black) !important;
}

/* ===========================================
   Spinner Animation
   =========================================== */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner > div {
    width: 12px;
    height: 12px;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

.spinner .bounce3 {
    animation-delay: -0.08s;
}

.spinner .bounce4 {
    animation-delay: 0s;
}

.spinner .bounce5 {
    animation-delay: 0.08s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* ===========================================
   Result Messages
   =========================================== */
.result-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===========================================
   Modal Styles (Bootstrap 5)
   =========================================== */
.modal-content {
    border-radius: 8px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* ===========================================
   Utility Classes
   =========================================== */
.m-t-50 {
    margin-top: 0; /* Rimosso per centratura verticale */
}

.forgotPassword {
    color: var(--niq-bright-blue);
    text-decoration: none;
}

.forgotPassword:hover {
    text-decoration: underline;
}

/* ===========================================
   Responsive Adjustments
   =========================================== */
@media (max-width: 768px) {
    .has-h-1-font-size {
        font-size: 1.75rem;
    }
    
    .has-text-large-body-font-size {
        font-size: 1rem;
    }
    
    #loginFormContent {
        margin: 0 15px;
        max-width: calc(100% - 30px);
    }
}

/* Hide stats image */
img#wpstats {
    display: none;
}
