/* Reset & Base */
:root {
    --orange-main: #f39c12;
    --grey-text: #666666;
    --grey-label-bg: #e6e6e6;
    --grey-utilities-bg: #ececec;
    --link-color: #f29100;
    --font-stack: 'BaninterFamily', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.fisaDesert {
    font-family: var(--font-stack);
    background-color: var(--orange-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 75px;
    margin: 0;
}

.bgbody {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/background_omnia.jpg');
    background-size: cover;
    background-position: center top;
    z-index: -1;
}

/* Header */
#header {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

#logo img {
    display: block;
}

#logo {
    margin-bottom: 15px;
}

#topnavhome {
    width: 100%;
    display: flex;
    justify-content: center;
}

.menuhome {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

.menuhome li {
    padding: 0 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    line-height: 1;

    color: white;
}

.menuhome li.last-item {
    border: none;
}

.menuhome li a {
    color: white;
    text-decoration: none;
}



/* Main Card */
#finalUserContent {
    width: 100%;
    max-width: 1050px;
}

#formwindow {
    background-color: rgba(255, 255, 255, 0.35);
    padding: 17px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.row-form-login.border-bottom {
    background-color: white;
    display: flex;
}

#mainContainer {
    display: flex;
    width: 100%;
}

/* Left Column */
.col6 {
    flex: 1;
    padding-top: 80px;
    padding-right: 106px;
    padding-bottom: 30px;
    padding-left: 38px;
}


#lpwindow {

    display: flex;
    justify-content: center;
}

#cmpwindow {
    width: 100%;
    max-width: 350px;
    padding-left: 65px;
}

h2.boldtext {
    font-weight: 500;
    color: #807e7e;
    font-size: 18px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

/* Form Widgets (Dojo Structure) */
.row-section {
    margin-bottom: 15px;
    width: 100%;
}

.input-widget {
    display: flex;
    align-items: stretch;
    height: 26px;
    width: 100%;
}

.fisaLabel-login {
    background-color: var(--grey-label-bg);
    color: #555;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 8px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    white-space: nowrap;
    width: 110px;
    flex-shrink: 0;
}

.user-icon-svg {

    margin-right: 8px;
    display: block;
}

/* The Text Box */
.dijitTextBox {
    background: white;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    /* Rounded Right Corners */
    flex: 1;
    display: flex;
    position: relative;
    align-items: center;
    transition: border-color 0.2s;
}

/* User requested Orange border on focus, overlapping the label border */
.dijitTextBox:focus-within {
    border: 1px solid #f39c12;
    margin-left: -1px;
    /* Overlap the label's right border */
    z-index: 10;
}

.dijitInputContainer {
    width: 100%;
    height: 100%;
}

.dijitInputInner {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 10px;
    font-family: inherit;
    font-size: 12px;
    color: #333;
    background: transparent;
}

/* Info Button */
.fisaLink.info-link {
    /* Orange background removed if the SVG covers it, OR keep if SVG is transparent */
    background-color: transparent;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 2px;
    padding: 0;
}

.help-icon-svg {
    width: 100px;
    height: 70%;
    display: flow;
    margin-bottom: 9px;
}

/* Buttons */
.button-section {
    margin-top: 20px;
    width: 100%;
}

.dijitButton {
    display: block;
    width: 100%;
    cursor: pointer;
}

.dijitButtonNode {
    display: block;
    background: linear-gradient(to bottom, #ffaa3d 0%, #f38f1e 100%);
    border: 1px solid #ff9200;
    border-radius: 3px;
    padding: 1px 0;
    text-align: center;
    width: 87%;

}

.dijitButtonNode:hover {
    background: linear-gradient(to bottom, #ffbe66 0%, #f39c12 100%);
}

.dijitButtonText {
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Dual Buttons */
.dual-buttons {
    display: flex;
    gap: 10px;
}

.dual-buttons .dijitButton {
    flex: 1;
}

.forgot-password-link {
    text-align: center;
    margin-top: 15px;
    display: block;
    width: 100%;
}

.forgot-password-link a {
    color: var(--link-color);
    font-size: 11px;
    text-decoration: underline;
}

/* Temporal User Msg */
/* Temporal User Msg */
#msg-login-form {
    background-color: #e6e6e6;
    padding: 16px;
    margin-top: 20px;
    /* border-left: 5px solid #f39c12; Removed as we now have the icon */
    font-size: 12px;
    color: #666;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 3px;
}

.msg-icon-wrapper img {
    margin-right: 10px;
    width: 32px;
    /* Adjust based on actual SVG size if needed */
    height: 28px;
    display: block;
}

.msg-text-wrapper {
    display: flex;
    flex-direction: column;
}

.text-msg-login-form a {
    color: var(--link-color);
    font-weight: bold;
    text-decoration: underline;
}

/* Right Column */
#rpwindow {
    background-color: #ebebec;
    display: flex;
    justify-content: flex-start;
}

#ayuda h2 {
    text-align: left;

    color: #666;
    margin-bottom: 34px;
}

.bullet-arrow {
    list-style: none;
    padding-left: 5px;
}

.bullet-arrow li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* Removed CSS triangle, using SVG instead */
.bullet-icon {

    margin-right: 8px;
    flex-shrink: 0;
}

.bullet-arrow a {
    color: var(--link-color);
    text-decoration: underline;

}

.bullet-arrow a:hover {
    text-decoration: none;
}

/* Footer Warning */
.icon-msg-footer {
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    padding: 15px 40px;

    color: #666;
    display: flex;
    align-items: center;
}

.shield-wrapper {
    margin-right: 15px;
}

.shield-icon {
    width: 30px;
}

.enfatize-text {
    color: #ff9200;
    text-decoration: underline;
}

#footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
}

/* Utils */
.hidden {
    display: none !important;
}

.disabled-look-dojo {
    background-color: white !important;
}

.disabled-look-dojo .dijitInputInner {
    color: black;
    font-weight: bold;
}

/* Step 2 Security */
.security-title {
    color: var(--orange-main);
    font-size: 11px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.security-loader {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 11px;
}

.loader-spinner {
    border: 2px solid #ddd;
    border-top: 2px solid var(--orange-main);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s infinite linear;
    margin-right: 10px;
}

.security-disclaimer {
    color: #f39c12;
    font-size: 12px;
    margin-top: 75px;
    line-height: 1.3;
    text-align: justify;
}

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

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

/* =========================================
   SECURITY PAGE STYLES
   ========================================= */

/* Body Background Update */
body.security-page {
    background-color: #f0f2f5;
    /* Light greyish background */
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Logged-In Header */
#header.logged-in-header {
    display: flex;
    flex-direction: row;
    /* Force row direction */
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1050px;
    /* Matching main page width */
    margin-bottom: 30px;
}

#header.logged-in-header #logo {
    margin-bottom: 0;
    /* Remove component margin */
}

#header.logged-in-header #logo img {
    /* Ensure the logo has a visible width if SVG lacks it */
    width: 200px;
    /* Adjust based on preference, typical logo width */
    height: auto;
}

.user-info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #999;
    font-size: 13px;
}

.welcome-text {
    color: #ccc;
}

.user-avatar-circle {
    width: 30px;
    height: 30px;
    background-color: #8faec4;
    /* Muted blue */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ccc;
    text-decoration: none;
}

/* Main Container */
.security-main-container {
    width: 100%;
    max-width: 1050px;
    /* Matching header width */
    position: relative;
    padding-bottom: 50px;
}

/* Waiting State */
#waiting-state {
    background-color: #ffffff;
    /* Grey background like reference */
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 380px;
    /* Approximate height of form area */

    /* Fix layout issues */
    width: 100%;
    flex: 1;
    /* Grow to fill flex parent if needed */
}

.waiting-content {
    text-align: center;
}

.loader-gif {
    display: block;
    margin: 0 auto 15px auto;
    /* Adjust size if the gif is too big/small, otherwise auto */
    height: auto;
}

.big-loader {
    /* Creating a custom loader resembling orange bars or just a big orange spinner */
    border: 5px solid rgba(243, 156, 18, 0.3);
    border-top: 5px solid #d35400;
    /* Darker orange */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s infinite linear;
    margin: 0 auto 15px auto;
}

/* Try to match the 'bars' look if possible with CSS, or stick to spinner */
.big-loader {
    border: none;
    width: 40px;
    height: 40px;
    background: transparent;
    position: relative;
    /* Constructing a simple bar loader */
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    border-radius: 0;
    animation: none;

    /* Fallback to simple spinner if no image */
    border: 4px solid #f39c12;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.waiting-text {
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

/* Orange Bar */
.top-orange-bar {
    height: 40px;
    background-color: #f3ca88;
    /* Lighter orange/beige from image */
    width: 100%;
    margin-bottom: 0;
}

/* Faded Panel */
.register-equipment-panel {
    background-color: #ffffff;
    padding-bottom: 40px;
    opacity: 0.4;
    /* Faded look */
}

.panel-title-bar {
    background-color: #e0e0e0;
    color: #999;
    text-align: center;
    padding: 8px;
    font-size: 13px;
}

.panel-body-faded {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
}

.instruction-text {
    color: #999;
    margin-bottom: 10px;
    font-size: 13px;
}

.faded-input {
    border: 1px solid #ccc;
    background: #f9f9f9;
    width: 200px;
    height: 25px;
    margin-bottom: 15px;
}

.faded-buttons {
    display: flex;
    gap: 10px;
}

.btn-faded {
    background: #f3ca88;
    border: none;
    color: white;
    padding: 5px 20px;
    font-size: 12px;
}

/* Modal Overlay */
.security-modal-overlay {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 100;
}

.security-modal-box {
    background: white;
    width: 600px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.modal-header-bar {
    background-color: #666;
    color: white;
    padding: 8px 15px;
    font-size: 13px;
    display: flex;
    justify-content: center;
    /* Center the title */
    align-items: center;
    position: relative;
}

.close-icon {
    position: absolute;
    right: 15px;
    cursor: pointer;
    font-size: 14px;
}

.modal-content-body {
    padding: 30px;
    background-color: #f4f4f4;
    /* Light grey modal body */
    display: flex;
    flex-direction: column;

}

.modal-instruction {
    font-size: 12px;
    color: #666;
    margin-bottom: 25px;
    text-align: left;
}

.modal-form-inline {
    display: flex;
    flex-direction: row;
    /* Horizontal layout as requested */
    align-items: center;
    justify-content: center;
    gap: 15px;
    /* Increased gap */
    margin-bottom: 25px;
    width: 100%;
}

.modal-label {
    font-size: 13px;
    color: #444;
    /* Slightly softer grey */
    font-weight: bold;
    white-space: nowrap;
    margin: 0;
}

.modal-select {
    width: 300px;
    /* Fixed wider width like image */
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: 13px;
    height: 30px;
}

.modal-answer-input {
    width: 120px;
    /* Specific width for answer */
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    height: 30px;
}

.modal-footer-action {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.modal-confirm-btn {
    width: auto !important;
    min-width: 110px;
    padding: 5px 25px;
    cursor: pointer;
    background: linear-gradient(to bottom, #ffaa3d 0%, #f38f1e 100%);
    border: 1px solid #ff9200;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    font-size: 13px;

}

.modal-confirm-btn:hover {
    background: linear-gradient(to bottom, #ffbe66 0%, #f39c12 100%);
}

/* Error Bubble for Code */
/* Allow bubble to show outside */
.modal-content-body {
    overflow: visible !important;
}

/* Error Bubble for Code */
.error-bubble {
    position: absolute;
    left: calc(100% + 12px);
    /* Right of the input with spacing */
    top: -36%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ccc;
    color: #e67e22;
    /* Orange text */
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    border-radius: 2px;
}

.error-bubble::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #ccc;
}

.error-bubble::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-right: 5px solid white;
    z-index: 1;
}

/* =========================================
   MOBILE RESPONSIVE STYLES
   ========================================= */
@media screen and (max-width: 768px) {

    body.fisaDesert {
        padding-top: 10px;
        /* Reduce top padding */
    }

    /* Header adjustments */
    #header {
        margin-bottom: 10px;
    }

    #logo img {
        max-width: 80%;
        /* Ensure logo scales down */
        height: auto;
        margin: 0 auto;
    }

    #topnavhome {
        display: none;
        /* Often hide top nav on mobile or stack it */
    }

    /* Main Content adjustments */
    #mainContainer {
        flex-direction: column !important;
        /* Stack columns vertically */
    }

    .col6 {
        padding: 20px;
        /* Reset huge padding */
        width: 100% !important;
        flex: none !important;
        padding-right: 0 !important;
        /* Remove right padding */
        padding-left: 0 !important;
        /* Remove left padding */
    }

    /* Left Column specific */
    #lpwindow {
        padding-bottom: 0;
    }

    #cmpwindow {
        padding-left: 0;
        max-width: 100%;
    }

    /* Form inputs */
    .input-widget {
        height: 34px;
        /* Slightly larger touch target */
    }

    .fisaLabel-login {
        width: 90px;
        font-size: 11px;
    }

    /* Footer message */
    .icon-msg-footer {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .shield-wrapper {
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* Modal adjustments */
    .custom-modal {
        width: 95% !important;
        margin: 0 auto;
    }

    /* Security Image Page adjustments */
    #header.logged-in-header {
        flex-direction: column;
        gap: 15px;
    }

    .user-info-header {
        width: 100%;
        justify-content: center;
    }

    /* Security modal responsive */
    .security-modal-box {
        width: 95%;
    }

    .modal-form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-select,
    .modal-answer-input {
        width: 100%;
    }

    .error-bubble {
        left: 0;
        top: -45px;
        width: 100%;
    }
}