﻿/*animations */
.main-fade-animation {
    animation: fadeIn 0.8s ease-in-out;
}

.step-fade-animation {
    animation: stepFadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*containers*/
#main-container{
    padding-top:7rem !important;
}

.poll-card {
    padding: 1rem;
    padding-top: 3rem;
    background-color:white;
    padding-bottom: 4rem;
    border: 0.1px solid transparent;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.form-styles {
    display: flex;
    flex-direction: column;
    align-items: start;
}

/* navbar fixing */
.nav-fix {
    background-color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* text input override */
.form-control:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: transparent !important;
    outline: 0;
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.15rem #2CB0F2 !important;
}

/* input check overrides */

.form-check-input {
    background-color: #c2cee2 !important;
}
.form-check-input:checked {
    background-color: #2CB0F2 !important;
    border-color: #2CB0F2 !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #2CB0F2 !important;
}

.form-check-input:focus {
border-color: #2CB0F2 !important;
outline: 0;
}

.step-warn {
    color: indianred;
}

/* check badge */
.check-badge {
    background-color: #2CB0F2;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 2rem;
    font-weight: bold;
}

.error-badge {
    background-color: #2CB0F2;
    color: white;
    border-radius: 50%;
    padding: 5px 10px;
    font-size: 4rem;
    font-weight: bold;
}


/* button styles */

.take-survey-button {
    position: relative;
    color: white;
    background-color: #2CB0F2;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    display: inline-block; /* prevents scaling glitches */
}

.take-survey-button:hover {
    transform: scale(1.04); /* grows slightly */
    background-color: #2496cc; /* optional darker shade */
}

.main-button {
    background-color: #2CB0F2;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
    border: none;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

.secondary-button {
    background-color: white;
    text-decoration: none;
    padding: 5px 10px;
    border: 0.5px solid black;
    border-radius: 5px;
    color: black;
    font-size: 1rem;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

.secondary-button:hover {
    background-color: #2CB0F2;
    color: white;
}

.main-button:hover,.take-survey-button:hover {
    background-color: #008acf;
}

.modal-header .btn-close {
    margin: 0 !important;
}

.navbar-items-container {
    display: flex;
    align-items: center;
    justify-content:space-around;
    gap: 4px;
}

.logo-text {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 1.2rem;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* container */
.step-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0; /* spacing handled by margins on indicators */
    padding: 8px 12px;
    position: relative;
}

/* circle + text */
.step-indicator {
    --circle-size: 36px; /* tweak this for larger/smaller circles */
    width: var(--circle-size);
    height: var(--circle-size);
    min-width: var(--circle-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 2;
    margin: 0 20px; /* distance between centers (adjust as needed) */
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
    background: #ffffff; /* default background (overrides bootstrap badge look) */
    color: #000;
    border: 1px solid #000;
    box-sizing: border-box;
}

/* connector line to the next indicator */
.step-indicator:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -40px; 
    width: 40px; 
    height: 2px;
    transform: translateY(-50%);
    background-color: #dee2e6; /* base line color */
    z-index: 1;
}
html[dir="rtl"] .step-indicator:not(:last-child)::after {
    right: auto;
    left: -40px; /* mirror for RTL */
}

.badge-primary {
    background: #2CB0F2;
    color: #fff;
}

.badge-success {
    background: #198754;
    color: #fff;
}

.badge-secondary {
    background: white;
    border: 0.5px solid black;
    color: black;
}

/* language toggler */
.language-toggle {
    display: inline-block;
    position: relative;
    user-select: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    background: #e0e0e0;
    border-radius: 25px;
    padding: 4px;
    cursor: pointer;
    width: 80px; /* adjust width */
    height: 34px; /* adjust height */
    position: relative;
    justify-content: space-between;
    font-size: 14px;
    font-weight: bold;
}

.toggle-option {
    flex: 1;
    text-align: center;
    z-index: 2;
    color:white;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #2CB0F2;
    border-radius: 20px;
    z-index: 1;
    transition: none; /* no transition on first render */
}

/* Enable transition only after load */
body.loaded .toggle-slider {
    transition: transform 0.3s ease;
}

/* Checked state (switch to right) */
#languageToggle:checked + .toggle-label .toggle-slider {
    transform: translateX(100%);
}

/* Loader styles */
.pageLoader {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    opacity: 0.5;
    justify-content: center;
    align-items: center;
}

.spinner-border {
    color: #2CB0F2;
}

.required-field::after {
    content: '*';
    color: red;
    margin-left: 5px;
}