/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* keeps logo-bottom below */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/voiceIt_background_new.png");
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: -1;
}

.container {
    flex: 1; /* let it take available space */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 1;
}
.row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.justify-content-center {
    justify-content: center;
}

.col-md-5,
.col-lg-12,
.col-md-6,
.col-md-12 {
    position: relative;
    width: 100%;
    padding: 15px 15px;
}

.col-md-5 {
    flex: 0 0 41.666667%;
    /* max-width: 41.666667%; */
}

#langChangeForm {
    margin-top: 10px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Card Styles */
.card-h {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.35rem;
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.o-hidden {
    overflow: hidden !important;
}

.border-0 {
    border: 0 !important;
}

.card-body {
    flex: 1 1 auto;
    padding: 0;
}

.p-0 {
    padding: 0 !important;
}

.card-p {
    padding: 1rem 2rem;
}

/* Header Styles */
.head {
    margin-bottom: 0.5rem;
    position: relative;
    min-height: 60px;
}

.head h1 {
    margin-bottom: 0 !important;
    float: left;
    width: 60%;
    font-size: 1.75rem;
    color: #5a5c69;
    font-weight: 400;
}

.h4 {
    font-size: 1.75rem;
}

.text-gray-900 {
    color: #5a5c69 !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.head img {
    position: absolute;
    right: 0;
    top: 0;
    height: 50px;
    transition: opacity 0.5s ease-in-out;
}

/* Utility Classes */
.f-l {
    float: left;
}

.f-r {
    float: right;
}

.f-w {
    width: 100%;
}

.m-t-10 {
    margin-top: 10px;
}

.m-b-20 {
    margin-bottom: 20px;
}

.text-align-right {
    text-align: right !important;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-control,
.form-control-user {
    display: block;
    width: 100%;
    height: calc(1.5em + 1.5rem + 2px);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-control-user:focus {
    color: #6e707e;
    background-color: #fff;
    border-color: #bac8f3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.bdate label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #5a5c69;
}

.bdate .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.bdate input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 0rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 0.35rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    color: #fff;
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    color: #fff;
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    color: #fff;
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn-user {
    font-weight: 600;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.login-btn {
    margin-top: 1.5rem;
}

/* Error Styles */
.login-error,
.survey-error {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.error-border {
    border: 2px solid #e74a3b !important;
}

/* Select2 Styles */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: calc(1.5em + 1.5rem + 2px);
    padding: 0.75rem 1rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    background-color: #fff;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    line-height: 1.5em;
    padding-left: 0;
    color: #6e707e;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    height: calc(1.5em + 1.5rem);
    right: 10px;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__placeholder {
    color: #858796;
}

.select2-dropdown {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
}

.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: #4e73df;
}

/* Loading Spinner */
#login-loader,
#open-survey-loader {
    display: none;
}

.btn .fa-spinner {
    font-size: 0.9rem;
}

.icon-b {
    margin-right: 5px;
}

/* Second Screen */
.second {
    display: none;
    width: 100%;
}

.second::after {
    content: "";
    display: table;
    clear: both;
}

.s-top {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e3e6f0;
}

.s-top > div:first-child {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #5a5c69;
    line-height: 1.6;
    white-space: nowrap;
}

.s-top .form-group {
    margin-bottom: 0;
}

.s-top .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem 0rem;
    font-size: 1rem;
}

.s-top .icon-b {
    margin-right: 0;
    font-size: 1.1rem;
}

.title_lastname {
    font-weight: 600;
    color: #1cc88a;
    display: inline-block;
}

.s-bottom {
    margin-top: 2rem;
}

.s-bottom > div:first-child {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #5a5c69;
    line-height: 1.6;
    text-align: center;
}

.s-bottom .form-group {
    margin-bottom: 0;
}

.s-bottom .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem 0rem;
    font-size: 1rem;
}

.title_lastname {
    font-weight: bold;
    color: #2e59d9;
}

.s-bottom {
    margin-top: 1rem;
}

/* Third Screen */
.third {
    display: none;
}

/* Logo */
.logo-bottom {
    position: fixed;
    bottom: 20px;
    left: 0px;
    width: 20rem;
    height: auto;
    z-index: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 1rem;
    border-top: 1px solid #dee2e6;
}

.close {
    padding: 0;
    background-color: transparent;
    border: 0;
    appearance: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
}

.close:hover {
    opacity: 0.75;
}

.sapMTitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2e59d9;
    margin-top: 1.5rem;
}

/* Links */
a.small {
    font-size: 0.875rem;
    color: #4e73df;
    text-decoration: none;
}

a.small:hover {
    color: #2e59d9;
    text-decoration: underline;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.fa-pulse {
    animation: spin 1s infinite linear;
}

/* Responsive */
@media (max-width: 768px) {
    .col-md-5 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .card-p {
        padding: 1.5rem;
    }

    .head h1 {
        font-size: 1.5rem;
        width: 50%;
    }

    .head img {
        height: 40px;
    }

    .logo-bottom {
        width: 100px;
        bottom: 10px;
        left: 10px;
    }

    .bdate .form-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    #langChange {
        width: 100% !important;
        margin-top: 10px !important;
    }
}

/* RTL Support */
[dir="rtl"] .f-l {
    float: right;
}

[dir="rtl"] .f-r {
    float: left;
}

[dir="rtl"]
    .select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    left: 10px;
    right: auto;
}

[dir="rtl"] .head img {
    right: auto;
    left: 0;
}

[dir="rtl"] .logo-bottom {
    left: auto;
    right: 20px;
}

[dir="rtl"] .s-top > div:first-child,
[dir="rtl"] .s-bottom > div:first-child {
    text-align: right;
}

[dir="rtl"] .s-top .btn,
[dir="rtl"] .s-bottom .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .icon-b {
    margin-right: 0;
    margin-left: 8px;
}
