/* Blue Carbon Survey Custom Styles - Elegant Light Theme */

/* Body and main layout */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 100vh;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Header styling */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 60px 20px 30px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 16px 16px 0 0;
    margin: -20px -20px 30px -20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

header h1 {
    color: #1d1d1f;
    margin: 0 0 12px 0;
    font-size: 2.5em;
    font-weight: 600;
    letter-spacing: -0.5px;
}

header p {
    color: #86868b;
    font-size: 1.1em;
    margin: 0;
    font-weight: 400;
}

/* Tab bar navigation */
.tab-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 20px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.15);
}

.tab-btn.active {
    background: #233162ff;
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.3);
}

/* Info icon styles */
.info-icon {
    margin-left: 6px;
    color: #233162ff !important;
    cursor: help;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    width: 18px;
    height: 18px;
    text-align: center;
    border-radius: 50%;
    background: rgba(35, 49, 98, 0.1);
    border: 1px solid rgba(35, 49, 98, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    vertical-align: middle;
    line-height: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.info-icon:hover {
    background: #233162ff !important;
    color: white !important;
    transform: scale(1.1);
    border-color: #233162ff;
    box-shadow: 0 4px 12px rgba(35, 49, 98, 0.4);
}

/* Survey container customizations */
#surveyElement {
    margin-top: 20px;
}

/* Fix checkbox styling */
.sv_q_checkbox_inline .sv_q_checkbox_control_item {
    margin-bottom: 12px;
}

.sv_q_checkbox .sv_q_checkbox_control_item {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sv_q_checkbox .sv_q_checkbox_control_item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Fix radio button styling */
.sv_q_radiogroup .sv_q_radiogroup_control_item {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sv_q_radiogroup .sv_q_radiogroup_control_item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Enhanced choice text rendering */
.sv_q_checkbox_control_item label,
.sv_q_radiogroup_control_item label {
    cursor: pointer;
    line-height: 1.5;
    word-wrap: break-word;
    color: #1d1d1f;
    font-weight: 400;
}

/* Progress bar styling */
.sv_progress {
    margin-bottom: 20px;
}

.sv_progress_bar {
    background: #233162ff !important;
    border-radius: 8px !important;
}

/* Button styling */
.sv_nav .sv_btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    border: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sv_complete_btn {
    background: #30d158 !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(48, 209, 88, 0.3) !important;
}

.sv_complete_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(48, 209, 88, 0.4) !important;
}

.sv_next_btn {
    background: #233162ff !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv_next_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

.sv_prev_btn {
    background: #233162ff !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv_prev_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

/* Question title styling */
.sv_q_title {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
    font-size: 18px;
    letter-spacing: -0.2px;
}

/* Result display */
#surveyResult {
    margin-top: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

#resultContent {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 13px;
    color: #1d1d1f;
    line-height: 1.4;
}

/* Custom styling for survey elements */
.sv_main .sv_container {
    max-width: none !important;
}

/* File upload styling */
.sv_q_file input[type="file"] {
    padding: 16px;
    border: 2px dashed rgba(35, 49, 98, 0.3);
    border-radius: 12px;
    background: rgba(35, 49, 98, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sv_q_file input[type="file"]:hover {
    border-color: rgba(35, 49, 98, 0.5);
    background: rgba(35, 49, 98, 0.1);
    transform: translateY(-2px);
}

/* HTML content styling */
.sv_q_html {
    margin: 16px 0;
    color: #1d1d1f;
    line-height: 1.5;
}

/* Fix for long text in choices */
.sv_q_checkbox_control_item .sv_q_checkbox_control_label,
.sv_q_radiogroup_control_item .sv_q_radiogroup_control_label {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.5;
    color: #1d1d1f;
    font-weight: 400;
}

/* Enhanced tooltip alternative */
.info-tooltip {
    position: relative;
    display: inline-block;
}

.info-tooltip .tooltiptext {
    visibility: hidden;
    width: 320px;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    text-align: left;
    border-radius: 12px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -160px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.info-tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translateY(-4px);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
        margin: 8px;
        border-radius: 20px;
    }
    
    header {
        margin: -16px -16px 24px -16px;
        padding: 32px 16px 24px 16px;
        border-radius: 20px 20px 0 0;
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .info-tooltip .tooltiptext {
        width: 280px;
        margin-left: -140px;
    }
}

/* Make sure all text is easily readable */
.sv_main {
    color: #1d1d1f;
}

.sv_page {
    color: #1d1d1f;
}

.sv_q {
    color: #1d1d1f;
}

.sv_q_description {
    color: #86868b;
    font-weight: 400;
}

/* Survey navigation buttons container */
.sv_nav {
    background: transparent !important;
    border: none !important;
    padding: 16px 0 !important;
}

/* Override any default SurveyJS button styles */
.sv_nav .sv_btn:not(.sv_complete_btn) {
    background: #233162ff !important;
    color: white !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv_nav .sv_btn:not(.sv_complete_btn):hover {
    background: #233162ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

/* Target specific SurveyJS button classes */
.sv-footer__next-btn {
    background: #233162ff !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv-footer__next-btn:hover {
    background: #233162ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

.sv-footer__prev-btn {
    background: #233162ff !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv-footer__prev-btn:hover {
    background: #233162ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

.sv-footer__start-btn {
    background: #233162ff !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(35, 49, 98, 0.3) !important;
}

.sv-footer__start-btn:hover {
    background: #233162ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35, 49, 98, 0.4) !important;
}

.sv-footer__complete-btn {
    background: #30d158 !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(48, 209, 88, 0.3) !important;
}

.sv-footer__complete-btn:hover {
    background: #30d158 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(48, 209, 88, 0.4) !important;
}

/* Make sure survey content has proper transparency */
.sv_main .sv_container .sv_body {
    background: transparent;
}

.sv_main .sv_container .sv_header {
    background: transparent;
}

.sv_main .sv_container .sv_footer {
    background: transparent;
}

/* Additional refinements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Hide duplicate survey title that matches the header */
.sv_main .sv_container .sv_body h3[aria-label="Blue Carbon Credit Eligibility Assessment"] {
    display: none !important;
}

/* Hide survey description that duplicates header text */
.sv_main .sv_container .sv_body .sv-string-viewer--multiline {
    display: none !important;
}

/* Alternative approach - hide the title component entirely */
survey-element-title {
    display: none !important;
}

/* Hide any survey header content that duplicates our custom header */
.sv_main .sv_header {
    display: none !important;
}