﻿#bankid > .panel {
    max-width: 31.25rem;
    margin: 0 auto;
}

#bankid #logo {
    padding-top: 0.625rem;
    width: 5rem;
}

#bankid h4 {
    padding-bottom: 0.625rem;
}

.bid-li {
    width: 100%;
    display: flex;
}

.nav-tabs > li:not(.active):hover {
    border-color: #eee #eee #ddd;
}

.nav > li:not(.active):hover {
    text-decoration: none;
    background-color: #eee;
}

.bid-li > a {
    text-align: center;
    width: 100%;
    margin-bottom: 0.7rem;
    margin-top: 0.4rem;
    color: #5D5FEF;
}

.bid-login-text {
    margin-top: 1.2rem;
    font-size: 1.5rem;
}


.bid-li.active {
    border: none;
    border-bottom: 0.188rem solid #286090;
}

.bid-login-btn {
    margin-top: 1rem;
}

#bankid #nid-help-text {
    color: #667085;
    padding: 0.375rem;
    padding-bottom: 0;
}

#bankid #cancelOrderButton {
    margin: 0.625rem auto;
    margin-bottom: 1.25rem;
}

#bankid.container-mobile #cancelOrderButton {
    margin-top: 1.563rem;
}

#backgroundImage {
    position: absolute;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position:unset;
    margin-left: 15%;
    margin-top: 10%;
}

.signInOptionButton {
    height: 4vh;
    min-width: 1.25rem;
    border: thin solid;
    background-color: rgb(35, 89, 113);
    color: white;
    border-radius: 0.25rem;
    transition-duration: 0.4s;
}

.signInOptionButton:hover {
    border: thin solid;
    border-color: rgb(69, 155, 190);
    background-color: white;
    color: black;
}

#bankIdImg {
    margin: 3vh 0;
}

#entryEventImg {
    margin-bottom: 0px;
}

.leftContainer {
    position: absolute;
    left: 0px;
    height: 80vh;
    min-width: 19%;
    max-width: 19%;
    background-color: #fafafa;
    box-shadow: 0.625rem 0 0.625rem -0.125rem grey;
    text-align: center;
}

.loginArea {
    margin-top: 0px;
    display: flex;
    flex-direction: column;
}

.signInContainer {
    margin-top: 0%;
    padding-top: 0%;
}

.mobileContainerDiv {
    text-align: center;
    height: 80vh;
    width: 100%;
    background-color: #fafafa;
}

.mobileContainerDiv .card {
    width: 100%;
    height: 100%;
}

.signInContainerMobile {
    margin-top: 0%;
    padding-top: 0%;
}

.bankIdSignInOptions {
    margin: auto;
    width: 25%;
    height: 25vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    border: thin;
    border-style: solid;
    border-color: rgb(35, 89, 113);
    align-items: center;
}

.bankIdSignInOptions > a {
    margin-top: 1vh;
    width: 70%;
    border-style: solid;
    border: inherit;
    color: white;
    background-color: rgb(69, 155, 190);
}

.qrCodeContainer {
    text-align: center;
    margin-bottom: 1vh;
}

.qrContainer .qrCodeImage {
    min-width: 30%;
    max-width: 50%;
    height: auto;
}

/* Progress Bar Styles */
.progress-container {
    margin: 20px auto;
    max-width: 400px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 30%, #28a745 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.progress-attempts {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

/* QR Code Clickable and Fullscreen Styles */
.qr-clickable {
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 8px;
}

.qr-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.qr-clickable:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Browser native fullscreen styles */
.qrContainer:-webkit-full-screen {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qrContainer:-moz-full-screen {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qrContainer:fullscreen {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qrContainer:-webkit-full-screen .qrCodeImage,
.qrContainer:-moz-full-screen .qrCodeImage,
.qrContainer:fullscreen .qrCodeImage {
    max-width: 90vmin;
    max-height: 90vmin;
    min-width: 300px;
    width: auto;
    height: auto;
}

/* Responsive QR scaling based on viewport and zoom */
.qrCodeImage {
    max-width: min(50vw, 400px);
    min-width: 200px;
    width: 300px;
    height: auto;
    transition: all 0.3s ease;
}

/* Mobile devices - prioritize proper QR display */
@media (max-width: 767px) {
    .qrCodeImage {
        width: min(65vw, 300px) !important;
        max-width: 300px !important;
        min-width: 250px !important;
        height: auto;
        margin: 0 auto !important;
    }
    
    .qrContainer {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        margin: 20px auto !important;
        padding: 20px !important;
        background: transparent !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Ensure the entire view flows properly on mobile */
    #bankid .panel-body {
        padding: 15px !important;
    }
    
    .nav-tabs {
        margin-bottom: 20px !important;
    }
}

/* Scale QR with browser zoom - larger at higher zoom levels */
@media (min-width: 768px) and (max-width: 1024px) {
    .qrCodeImage {
        width: min(40vw, 400px);
        max-width: 400px;
    }
}

@media (min-width: 1025px) {
    .qrCodeImage {
        width: min(30vw, 450px);
        max-width: 450px;
    }
}

/* Extend Button Styles */
.extend-container {
    text-align: center;
    margin: 20px auto;
    max-width: 400px;
}

.extend-btn {
    background-color: #286090;
    border-color: #286090;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.extend-btn:hover {
    background-color: #204d74;
    border-color: #204d74;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.extend-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Sticky QR Code for better accessibility */
.qrContainer {
    position: sticky;
    top: 10px;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-container {
        margin: 15px auto;
        max-width: 90%;
        text-align: center;
    }
    
    .extend-container {
        max-width: 90%;
        text-align: center;
        margin: 15px auto;
    }
    
    /* Ensure content flows naturally on mobile */
    .statusMessages {
        margin: 10px auto;
        max-width: 90%;
        text-align: center;
    }
    
    /* Mobile-specific centering */
    .center-block {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 480px) {
    .qrCodeImage {
        width: min(70vw, 280px) !important;
        max-width: 280px !important;
        min-width: 220px !important;
    }
    
    .qrContainer {
        margin: 0 auto !important;
        padding: 10px !important;
        max-width: 100% !important;
    }
    
    .progress-text {
        font-size: 14px;
    }
    
    .extend-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    #bankid .panel-body {
        padding: 10px !important;
    }
}

/* High zoom level adjustments */
@media (min-resolution: 192dpi) and (max-width: 1024px) {
    .qrContainer {
        position: fixed;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        max-width: 90vw;
    }
}

/* Zoom-responsive QR scaling - mimics BankID behavior (desktop only) */
@media (min-zoom: 1.5) and (min-width: 768px) {
    .qrCodeImage {
        width: min(60vw, 500px);
        max-width: 500px;
    }
    
    .qrContainer {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1002;
        max-width: 90vw;
        max-height: 90vh;
    }
}

@media (min-zoom: 2) and (min-width: 768px) {
    .qrCodeImage {
        width: min(70vw, 600px);
        max-width: 600px;
    }
}

@media (min-zoom: 3) and (min-width: 768px) {
    .qrCodeImage {
        width: min(80vw, 700px);
        max-width: 700px;
    }
}

/* Firefox zoom detection alternative (desktop only) */
@media (-moz-min-device-pixel-ratio: 1.5) and (min-width: 768px) {
    .qrCodeImage {
        width: min(60vw, 500px);
        max-width: 500px;
    }
    
    .qrContainer {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1002;
    }
}

.ssnContainer {
    display: none;
}

.statusMessages {
    margin-top: 2%;
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 0;
    background-color: #e6f4f1;
    color: #0f5132;
    border: 1px solid #bcd0c7;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#printData {
    margin-top: 0;
    margin-bottom: 2%;
}

.loaderContainer {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    margin: 4.3rem auto;
    position: relative;
    width: 8rem;
    height: 8rem;
}

.loaderContainer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0.8rem solid #e5e7eb;
    border-radius: 50%;
    justify-self: center;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loader {
    width: 100%;
    height: 100%;
    border: 0.8rem solid transparent;
    border-top-color: #5d5fef;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.bank-id-ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.center-block {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.panel {
    margin-bottom: 1.25rem;
    background-color: #fff;
    border: 0.063rem solid transparent;
    border-radius: 0.25rem;
    -webkit-box-shadow: 0 0.063rem 0.063rem rgb(0 0 0 / 5%);
    box-shadow: 0 0.063rem 0.063rem rgb(0 0 0 / 5%);
}

.panel-default {
    border-color: #ddd;
}


.panel-body {
    padding: 2rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}