/*************************************************
  User custom CSS
  ----------------
  This file customizes the LimeSurvey theme to:
  - Apply brand typography and colors
  - Center the survey inside a card layout
  - Integrate header, progress bar, question and navigation
  - Ensure the layout fits the viewport without
    vertical or horizontal scrolling issues
*************************************************/


/* ==============================================
   Font import
   ============================================== */

/* Inter font for clean, modern readability */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');


/* ==============================================
   Brand variables
   ============================================== */

:root {
    --brand-orange: #f28c28;
    --brand-light-orange: #fff7eb;
    --brand-text: #1a1a1a;

    /* Override Bootstrap primary color */
    --bs-primary: #f28c28;
}


/* ==============================================
   Base typography & body layout
   ============================================== */

body,
.question-container,
.answer-item,
.btn {
    font-family: 'Inter', Helvetica, Arial, sans-serif !important;
}

body,
.survey-question,
.question-text,
.answer-text,
p {
    font-size: 18px;
    line-height: 1.55;
    font-weight: 500;
}

body {
    color: var(--brand-text);
    background: #F5F7FA;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 10px;
}

html, body {
    overflow-x: hidden !important;
    height: 100% !important;
}

/* Remove default LimeSurvey top spacing */
body .top-container {
    margin-top: 0 !important;
}


/* ==============================================
   Survey card layout (main structural element)
   ============================================== */

/* Central card containing the full survey step */
.survey-card {
    max-width: 720px;
    margin: 24px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

/* Remove default LimeSurvey outer backgrounds */
.top-container,
.outerframe {
    padding: 0;
    margin: 0;
    background: transparent;
}

/* Smooth appearance on page load */
@keyframes lsFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    opacity: 0;
    animation: lsFadeIn 0.42s ease-in-out forwards;
}


/* ==============================================
   Bootstrap normalization INSIDE the card
   (Prevents horizontal scrolling without hacks)
   ============================================== */

article {
    width: 95%;
    margin: auto;
}

/* ==============================================
   Header / Logo – layout fix
   ============================================== */

/* Neutralize LimeSurvey navbar behavior */
#survey-nav {
    position: relative;
    width: 100%;
    padding: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    justify-content: center;
}

/* Force header inner container to align with card */
#survey-nav .container-fluid {
    max-width: 100%;
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
}

/* Remove invalid grid behavior */
#survey-nav .container-fluid.col-xl-8 {
    flex: 1 1 auto;
}

/* Logo container */
.logo-container {
    display: flex !important; /* override d-none */
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 8px;
}

/* Ensure logo is always visible */
.logo-container.d-none {
    display: flex !important;
}

/* Logo image sizing */
.logo {
    max-width: 220px;
    width: 100%;
    height: auto;
}

.brand-logo .top-container .top-content {
    padding-top: 0em !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .logo {
        max-width: 180px;
    }
}


/* ==============================================
   Progress bar
   ============================================== */

#progressbar-top {
    margin-bottom: 12px;
}

.progress-bar {
    background-color: var(--brand-orange);
    width:100%;
}

/* ==============================================
   Question container & text
   ============================================== */

.question-container {
    background: #ffffff;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.question-container .ls-label-question {
    font-weight: 300 !important;
}

.question-text {
    hyphens: none;
}

.question-text p {
    text-align: center;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.question-container .question-valid-container {
    margin-top: 0px;
    margin-bottom: 0px;
}

.question-valid-container {
    font-size: 0.8em;
    padding-bottom: -20px !important;
}

@media (max-width: 480px) {
	.question-container {
	    min-height: 380px;
	}
}

/* Hide mandatory asterisk (ARIA remains intact) */
.asterisk.ri-asterisk {
    display: none !important;
}


/* ==============================================
   Answer options (radio buttons)
   ============================================== */

.answers-list li {
    margin-bottom: 10px;
}

.control-label.radio-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--brand-text);
}

/* Selected radio styling */
.radio-item input[type=radio]:checked + label {
    color: var(--brand-orange);
}

.radio-item input[type=radio]:checked + label::before {
    border-color: var(--brand-orange);
}

.radio-item input[type=radio]:checked + label::after {
    background-color: var(--brand-orange);
}


/* ==============================================
   Validation messages
   ============================================== */

.question-valid-container {
    order: 3;
    margin-top: 8px;
}


/* ==============================================
   Navigation / buttons
   ============================================== */

#navigator-container {
    margin: 0 !important;
    padding: 0 !important;
}

.btn-primary,
.ls-move-btn {
    background-color: var(--brand-orange);
    border: none;
    border-radius: 10px;
    padding: 6px 22px;
    color: #fff !important;
    font-weight: 500;
    transition: 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:active:focus {
    background-color: var(--brand-orange);
}

#ls-button-submit {
    width: 100%;
}

/* Back button – unobtrusive secondary action */
#ls-button-previous {
    background: transparent;
    border: 1px solid #d0d0d0;
    color: #6b6b6b !important;
    font-size: 0.95rem;
    padding: 10px 14px;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Arrow icon (RemixIcon) */
#ls-button-previous::before {
    content: "\ea64"; /* ri-arrow-left-line */
    font-family: "remixicon";
    font-size: 1.1rem;
    line-height: 1;
}

/* Optional: visually hide text but keep it accessible */
#ls-button-previous {
    text-indent: -9999px;
    width: 44px;
    padding: 10px;
}

#ls-button-previous::before {
    text-indent: 0;
}

/* Hover state */
#ls-button-previous:hover {
    background: #f5f5f5;
    color: #4f4f4f;
    border-color: #bdbdbd;
}

/* Focus / active cleanup */
#ls-button-previous:focus,
#ls-button-previous:active {
    box-shadow: none;
    outline: none;
}

/* Mobile: back button icon only */
@media (max-width: 576px) {
    #ls-button-previous {
        font-size: 0;              /* hides text */
        padding: 12px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #ls-button-previous::before {
        content: "‹";              /* arrow */
        font-size: 24px;
        line-height: 1;
        color: #6b6b6b;
    }
}

/* ==============================================
   Headings & spacing fixes
   ============================================== */

.space-col {
    margin-top: 0;
    margin-bottom: 0;
}


/* ==============================================
   Mobile adjustments
   ============================================== */

@media (max-width: 480px) {
    body,
    .survey-question,
    .question-text,
    .answer-text,
    p {
        font-size: 18px;
        line-height: 1.6;
    }

    .control-label.radio-label {
        font-size: 17px;
    }

    .survey-card {
        margin: 20px 12px;
        padding: 20px;
    }
}

/* Footer fixed */
.card-footer {
    position: absolute;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #eaebec !important;
    margin-top: 70px !important;
    max-height: 30px !important;
}
@media (max-width: 768px) {
    .logo {
        margin-top: 0px !important;
    }
}

#outerframeContainer {
    display: none !important;
}