/*
 * TPlus Theme - Custom CSS
 * Elegant and clean theme for professional questionnaires
 */

/* ========================================
   HEADER CUSTOMIZATION
   ======================================== */

/* Clean header with green border and QM Export logo */
body::before {
    content: "";
    display: block;
    width: 100%;
    height: 100px;
    background: #ffffff;
    border-bottom: 4px solid #2d7575;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ls-header {
    background: transparent !important;
    margin-top: 0 !important;
    padding-top: 15px !important;
    position: relative;
    z-index: 1001;
}

/* QM Export logo positioning - handled by template */
.tplus-qm-logo {
    /*position: absolute;*/
    float:left;
    z-index: 1002;
    max-width: 280px;
    height: auto;
}

/* Adjust body padding for fixed header */
body {
    padding-top: 120px !important;
    position: relative;
    background: #fafafa !important;
}

/* Survey container adjustments - Wide layout 1920x1080 */
.container.main-container {
    margin-top: 20px;
    max-width: 1920px;
    width: 100%;
    padding: 0 40px;
}

/* Full width layout for large screens */
@media (min-width: 1920px) {
    .container.main-container {
        max-width: 1920px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Large desktop (1440px - 1920px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .container.main-container {
        max-width: 1400px;
    }
}

/* Standard desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container.main-container {
        max-width: 1200px;
        padding: 0 30px;
    }
}

/* ========================================
   FOOTER CUSTOMIZATION
   ======================================== */

/* Clean footer with logos */
.ls-footer {
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0 15px 0;
    margin-top: 40px;
    position: relative;
}

/* Footer styling - logos handled by template */
.ls-footer .container {
    text-align: center;
    padding: 20px;
}

/* Hide default LimeSurvey branding if present */
.ls-footer .poweredby {
    display: none;
}

/* Footer text styling */
.ls-footer p,
.ls-footer small {
    color: #666666;
    font-size: 0.9rem;
}

/* ========================================
   GENERAL THEME IMPROVEMENTS
   ======================================== */

/* Clean and elegant question containers */
.question-container {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.question-container:hover {
    box-shadow: 0 2px 8px rgba(45, 117, 117, 0.08);
    border-color: #d0d0d0;
}

/* Primary color scheme - subtle green accents */
.btn-primary {
    background-color: #2d7575 !important;
    border-color: #2d7575 !important;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #3a8888 !important;
    border-color: #3a8888 !important;
}

/* Progress bar with green accent */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
}

.progress-bar {
    background-color: #2d7575;
}

/* Links - subtle color */
a {
    color: #2d7575;
    text-decoration: none;
}

a:hover {
    color: #3a8888;
    text-decoration: underline;
}

/* Survey title - elegant and minimal */
.survey-title,
h1.survey-title {
    color: #333333;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 25px;
    font-size: 2rem;
}

/* Welcome/Description container - clean and light */
.survey-description {
    background: #ffffff;
    border-left: 3px solid #2d7575;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Input fields - clean styling */
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    padding: 8px 12px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #2d7575;
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 117, 117, 0.1);
}

/* Radio and checkbox styling */
input[type="radio"],
input[type="checkbox"] {
    accent-color: #2d7575;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container.main-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .tplus-qm-logo {
        max-width: 220px;
        right: 20px;
    }

    .question-container {
        padding: 20px;
    }
}

/* Mobile landscape (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    body {
        padding-top: 100px !important;
    }

    body::before {
        height: 80px;
    }

    .container.main-container {
        padding: 0 15px;
    }

    .tplus-qm-logo {
        max-width: 180px;
        right: 15px;
        top: 15px;
    }

    .question-container {
        padding: 18px;
    }

    .survey-title,
    h1.survey-title {
        font-size: 1.5rem;
    }
}

/* Mobile portrait (up to 575px) */
@media (max-width: 575px) {
    body {
        padding-top: 90px !important;
    }

    body::before {
        height: 75px;
    }

    .container.main-container {
        padding: 0 12px;
    }

    .tplus-qm-logo {
        max-width: 160px;
        right: 10px;
        top: 12px;
    }

    .question-container {
        padding: 15px;
        margin-bottom: 15px;
    }

    .survey-title,
    h1.survey-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .survey-description {
        padding: 15px 18px;
        font-size: 14px;
    }

    .btn-primary {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    /* Footer adjustments for mobile - logos handled by template */
    .tplus-footer-logos {
        flex-direction: column;
        gap: 15px;
    }

    .ls-footer::after {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 0 auto;
        display: block;
    }

    .ls-footer .container {
        text-align: center;
        padding-bottom: 20px;
    }
}

@media (max-width: 576px) {
    /* Further adjustments for small screens */
    .ls-header::after {
        width: 150px;
        height: 50px;
    }

    .ls-footer::before,
    .ls-footer::after {
        width: 140px;
        height: 60px;
    }
}


/* ========================================
   YES/NO BUTTON - STATO SELEZIONE CHIARO
   ======================================== */

/* Stato DEFAULT: sfondo bianco, bordo e testo rosso */
.yesno-button .btn.btn-primary.answer-item,
.gender-button .btn.btn-primary.answer-item {
  background-color: #ffffff !important;
  border: 2px solid #A62024 !important;
  color: #A62024 !important;
  font-weight: 600 !important;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
  opacity: 1 !important;
}

/* Stato SELEZIONATO: rosso pieno, testo bianco, ombra evidente */
.yesno-button .btn-check:checked + .btn.btn-primary.answer-item,
.gender-button .btn-check:checked + .btn.btn-primary.answer-item {
  background-color: #A62024 !important;
  border: 2px solid #A62024 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(166, 32, 36, 0.3), inset 0 2px 4px rgba(0,0,0,0.15) !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* Hover sul bottone NON selezionato */
.yesno-button .btn.btn-primary.answer-item:hover,
.gender-button .btn.btn-primary.answer-item:hover {
  background-color: #f8e5e6 !important;
  border-color: #A62024 !important;
  color: #A62024 !important;
}