@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;700&display=swap');

:root {
    --color-primary-dark: #005f6f; /* Dark Blue */
    --color-light-bg: #e5f0f3; /* Light Blue-Green */
    --color-gray-text: #6b7280; /* Gray-600 */
    --color-black-text: #000000; /* Black */

    --color-cream: #f4efde; /* Cream */
    --color-teal: #005f6f; /* Teal */
    --color-darkteal: #004a57; /* Dark Teal */
    --color-blue: #e6eff1; /* Light blue */
    --color-pink: #f6e9f1; /* Pink */
    --color-white: #ffffff; /* White */
    --color-light-gray: #eeeeee; /* Gray */
    --colour-vlight-gray: #f7f7f7 /* Light Gray */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Libre Franklin', sans-serif;
    background-color: #f0f0f0;
    color: var(--color-primary-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Headings – use Bold */
h1, h2, h3, .section_title, .main-heading {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700; /* Bold */
}

/* Highlights – use Medium */
strong, .font-semibold, .primary-button, .login_button, .spark_button, .home_button, .next_button {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 500; /* Medium */
}

/* Body text – Regular */
p, span, label, input, select, button, li, a, .subtext {
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 400; /* Regular */
}

.page-container {
    max-width: 900px; 
    margin: 0rem auto;
    padding: 1rem 1rem 0.5rem 1rem;
    background-color: #f7f7f7;
}
@media (min-width: 900px) {
    .page-container {
        padding: 1rem 1rem 0.5rem 1rem;
        margin: 1rem auto;
        border: 1px #d0d0d0 solid;
    }
}

.text-teal { color: var(--color-teal); }
.text-gray { color: var(--color-gray-text); }
.text-black { color: var(--color-black-text); }
.font-semibold { font-weight: 550; }
.quest_title { margin:0rem;}
.quest_text { 
    margin:0rem; 
    padding: 0.25rem 0rem 0rem 0rem;
}

.section_grid_layout {
    margin-bottom: 1.5rem; 
    display:flex; 
    justify-content:space-between; 
    align-items:center;
    gap: 0.5rem;
}

/* ---------------------------------- */

@media (max-width: 600px) {
  header {
    flex-direction: column;         
    align-items: flex-start;        
    gap: 0.75rem;                   
  }

}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Mobile Override: Stack inputs vertically */
@media (max-width: 600px) {
    .edit-grid-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Mobile Header Override: Stack logo and center buttons */
    .page-container > header {
        flex-direction: column;         
        align-items: center !important; /* Center items when stacked */
        gap: 0.75rem;                   
    }
    .page-container > header h1 {
        margin-bottom: 0; /* Remove bottom margin on logo for better centering */
    }
}

.countdown {
    color: rgb(0, 0, 0);
    font-weight: bold;
    background: yellow;
    font-size: 1rem;
    padding: 0em 10px 0em 10px;
    margin: 0em 10px 0.5rem 10px;
}

.errormsg {
    font-weight: bold;
    background: yellow;
    display: none;
    padding: 0em 0.5em;
    border-radius: 5px; 
}

.crashmsg {
    font-weight: bold;
    background: yellow;
    display: none;
    padding: 0em 0.5em;
    border-radius: 5px; 
}

.issuemsg {
    font-weight: bold;
    background: yellow;
    display: none;
    padding: 0em 0.5em;
    border-radius: 5px; 
}

.infomsg {
    display: none;
    background: rgb(255, 255, 135);
    padding: 0em 0.5em;
    border-radius: 5px; 
}

.successmsg {
    display: none;
    background: rgb(255, 255, 135);
    padding: 0em 0.0em;
    border-radius: 5px; 
}

.infotext {
    background: rgb(255, 255, 135);
}

.pwdmsg {
    color: red;
    font-size: small;
    display: none;
    padding: 0em 0.5em 0em 0em;
    border-radius: 5px; 
}

/* ---------------------------------- */

.main-heading {
    font-size: clamp(1.4rem, 1.9vw + 0.5rem, 1.875rem); 
    font-weight: 800; 
    margin-top: 0.5rem; 
    margin-bottom: 1rem; 
}

.subtext {
    margin: 0rem; 
    padding-bottom: 0.5rem;
}

.text-lg { 
    font-size: 1.125rem; 
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1rem; 
}
@media (min-width: 768px) {
    .card-grid {
        /*grid-template-columns: repeat(2, 1fr); */ /* Two columns on desktop */
    }
    .hidden-desktop {
        display: none; 
    }
}

.questionnaire_card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--color-teal); 
    border-radius: 0rem; 
    background-color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition: box-shadow 150ms ease-in-out;
    cursor: pointer;
}
.questionnaire_card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); 
    background-color: #f9f9f9;
}

.icon-container {
    margin-right: 1rem; 
    padding: 0.5rem; 
    border-radius: 9999px;
    background-color: var(--color-primary-dark);
    flex-shrink: 0; 
}
.icon-placeholder {
    width: 1.5rem; 
    height: 1.5rem; 
}

/* -------------------------------------------- */        
.primary-button {
    background-color: var(--color-teal);
    color: white;
    font-size: initial;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: background-color 150ms ease-in-out;
}
.primary-button:hover {
    background-color: #005f75; 
}

.login_button, .spark_button {
    background-color: var(--color-teal);
    font-size: 1.12rem;
    color: white;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: background-color 150ms ease-in-out;
    margin: 0rem 0rem 0rem 18rem;
    width: auto;
}

.login_button:hover, .spark_button:hover {
    background-color: #005f75; 
}        

.login_button:disabled, .spark_button:disabled {
    background-color: #cccccc;  
    color: #666666;             
    cursor: not-allowed;        
    opacity: 0.7;               
}

.home_button {
    background-color: var(--color-teal);
    font-size: 1.12rem;
    color: white;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: background-color 150ms ease-in-out;
    margin: 0rem 0rem 0rem 0rem;
    width: auto;
    display: flex;
    align-items: center; /* Vertically center icon and text */
    gap: 0.5rem;         /* Small gap between icon and text */    
}

.home_button:hover {
    background-color: #005f75; 
}        

.home_button:disabled {
    background-color: #cccccc;  
    color: #666666;             
    cursor: not-allowed;        
    opacity: 0.7;               
}

.next_button {
    background-color: var(--color-teal);
    font-size: 1.12rem;
    color: white;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: background-color 150ms ease-in-out;
    margin: 0rem 0rem 0rem 0rem;
    width: auto;
}

.next_button:hover {
    background-color: #005f75; 
} 

.icon_button {
    background-color: var(--color-teal);
    font-size: 1.12rem;
    color: white;
    font-weight: 600;
    padding: 0.4rem 0.4rem;
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transition: background-color 150ms ease-in-out;
    margin: 0rem 0rem 0rem 0rem;
    width: auto;
    display: flex;
    align-items: center; /* Vertically center icon and text */
    gap: 0.5rem;         /* Small gap between icon and text */    
}

.icon_button:hover {
    background-color: #005f75; 
} 

/* -------------------------------------------- */
.section_title {
    font-size: 1.4rem; 
    font-weight: 750; 
    margin-top: 0.25rem; 
    margin-bottom: 1rem; 
}

.section_questionnaires, .section_messages, .section_info, 
.section_spark, .section_success, .section_email, .section_pref, .section_history,
.section_history1, .section_mainemail, .section_mainphone, .section_pref1, .section_mainaddress, 
.section_contact, .section_password_new, .section_information, .section_change,
.section_whoami {
    background-color: var(--color-cream);
}
.section_contact_det, .section_phone, .section_history2, .section_register,
    .section_edit_email_info, .section_edit_phone_info, .section_edit_address_info, 
    .section_signup, .section_login, .section_passwd, .section_save_btn,
    .section_welcome, .section_messages_odd {
    background-color: var(--color-blue);
}
.section_error, .section_address, .section_history3, .section_decline, .section_top,
.section_retire, .section_otheremail, .section_password, .section_inform, 
.section_otherphone, .section_pref2, .section_logout, .section_save, .section_exist,
.section_review, .section_messages_even {
    background-color: var(--color-pink);
}
.section_continue
{
    background-color: var(--colour-vlight-gray);
}

.section_questionnaires, .section_messages, .section_contact_det, .section_contact, .section_whoami,
 .section_email, .section_phone, .section_address, .section_signup, .section_pref, .section_top,
 .section_password, .section_password_new, .section_history, .section_inform, .section_info, .section_information, .section_error, .section_login, .section_register, .section_spark, .section_success,
 .section_history1, .section_history2, .section_history3, .section_edit_email_info, .section_decline,
 .section_mainemail, .section_mainphone, .section_pref1, .section_pref2, .section_mainaddress, .section_logout,
 .section_otheremail, .section_edit_phone_info, .section_otherphone, .section_save_btn,
 .section_edit_address_info, .section_retire, .section_save, .section_passwd,
 .section_welcome, .section_exist, .section_continue, .section_review, .section_change,
 .section_messages_odd, .section_messages_even {
    padding: 1.0rem 1.5rem 1.0rem 1.5rem; 
    border-radius: 0rem;
    margin-bottom: 0.75rem;
}

.section_help {
    padding: 1.0rem 1.5rem 1.0rem 1.5rem; 
    border-radius: 1.5rem;
    background-color: var(--color-light-gray);
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}


/* -------------------------------------------- */
.contact-item {
    display: flex;
    align-items: start;
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}
.contact-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0rem; 
}

.contact-icon-container {
    margin-right: 1rem; 
    padding: 0.5rem; 
    border-radius: 9999px;
    background-color: var(--color-primary-dark);
    flex-shrink: 0; 
}                
.contact-icon-placeholder {
    width: 0.9rem;
    height: 0.9rem; 
}

.contact-link {
    text-decoration: underline;
    color: var(--color-teal);
    font-weight: 600;
}
.contact-link:hover {
    text-decoration: underline;
}

.a_link {
    text-decoration: underline;
    color: var(--color-teal);
    font-weight: 600;
    cursor:pointer;
}
.a_link:hover {
    text-decoration: underline;
}

.contact-item {
  display: flex;
  align-items: flex-start;
}

.contact-item > div {
  min-width: 0; 
}

.contact-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* -------------------------------------------- */
.form-field-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-label {
    width: 14rem; /* Fixed width for labels to align inputs */
    font-size: 1rem;
    flex-shrink: 0;
    font-weight: 500;
}

.form-label-login {
    width: 18rem; /* Fixed width for labels to align inputs */
    font-size: 1rem;
    flex-shrink: 0;
    font-weight: 500;
}

.form-input {
    padding: 0.5rem 0.75rem; /* small vertical padding, generous horizontal */
    border: 1px solid #777777; 
    border-radius: 9999px; /* Fully rounded pill shape */
    flex-grow: 1;
    max-width: 10rem; /* Max width to match the visual width of the inputs */
    background-color: white;
    transition: border-color 150ms ease-in-out;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-teal);
}

.form-select {
    padding: 0.5rem 0.75rem; 
    margin-right: 1em;
    border: 1px solid #777777; 
    border-radius: 9999px; /* Pill shape matching .form-input */
    background-color: white;
    font-size: 1rem;
    color: var(--color-black-text);
    transition: border-color 150ms ease-in-out;
    cursor: pointer;
    
    /* Remove native arrow */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Add custom SVG arrow using your theme color (#005f6f) */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23005f6f%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem; /* Space so text doesn't overlap the arrow */
}

.form-select:focus {
    outline: none;
    border-color: var(--color-teal);
}

#surname-initial {
    max-width: 5rem; 
}

.link {
    display: block;
    margin-left: 1rem; 
    font-size: 0.875rem;
    color: var(--color-teal);
    text-decoration: underline;
    font-weight: 600;
}
.link:hover {
    text-decoration: underline;
}

/* --- Mobile Overrides  --- */
@media (max-width: 660px) {
    .form-field-group {
        /* Mobile Override: Stack elements vertically */
        flex-direction: column;
        align-items: flex-start; 
    }

    .link {
        /* Mobile Override: Remove left margin for full width alignment */
        margin-left: 0; 
    }

    .login_button, .spark_button {
        margin: 0rem 0rem 0rem 0rem;
    }    
}


@media (max-width: 600px) {
    .form-label {
        /* Mobile Override: Full width, add space below */
        width: 100%;
        margin-bottom: 0.25rem; 
    }

    .form-input {
        /* Mobile Override: Full width for easy tapping */
        max-width: 100%; 
        width: 100%;
        margin-right: 2em;
    }
    
    #surname-initial {
        /* Mobile Override: Full width */
        max-width: 10rem; 
    }
}

/* --------------------------------------------- */
.contact-link {
    text-decoration: underline;
    color: var(--color-teal);
    font-weight: 600;
}
.contact-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------- */
.env-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: white;
  border: 1px solid var(--color-teal);
  border-radius: 0;
  padding: 0.75rem 1rem;
}

.env-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

.env-row:last-child {
  border-bottom: none;
}

.env-param {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.env-value {
  color: var(--color-black-text);
  margin-left: 1rem;
  text-align: right;
  flex-shrink: 0;
  max-width: 60%;
  word-break: break-all;
}


/* --------------------------------------------- */

.history-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-section-content {
    background-color: white;
    padding: 1rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.25rem;
}

.history-item {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e0e0e0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    /* Desktop Default: Fixed width to keep names aligned */
    width: 150px; 
    font-weight: 500;
    color: var(--color-primary-dark);
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.history-name a {
    color: var(--color-teal);
    text-decoration: none; 
    font-weight: 600; 
}
.history-name a:hover {
    color: var(--color-darkteal);
    text-decoration: none; 
}

/* Mobile Override */
@media (max-width: 600px) {
    .history-item {
        /* Stack date and name vertically on small screens */
        flex-direction: column;
        align-items: flex-start;
    }

    .history-date {
        /* Full width, less margin on mobile */
        width: 100%;
        margin-right: 0;
        margin-bottom: 0.25rem;
        color: var(--color-black-text);
        font-weight: 700;
    }
}

/* --------------------------------------------- */
/* --------------------------------------------- */
.video-container1 {
  display: block; /* Crucial for span to respect width and padding */
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container1 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* --------------------------------------------- */
.video-container2 {
  display: block;
  position: relative;
  width: 50%; /* Starts at 50% width */
  padding-bottom: 28.125%; /* Keeps 16:9 ratio at 50% width (56.25% * 0.50) */
  height: 0;
  overflow: hidden;
  margin: 0 auto; /* Optional: centers the video */
}

.video-container2 iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Switches to full width on mobile/tablet screens */
@media (max-width: 768px) {
  .video-container2 {
    width: 100%;
    padding-bottom: 56.25%; /* Restores full 16:9 ratio padding */
  }
}


/* --------------------------------------------- */

/* --------------------------------------------- */
/* --- Contact Details Layout (User Request) --- */

/* Header Row: Title on left, Button on right */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem; /* Space between header and data rows */
}

/* Make the title take up less space */
.section-header-row .section_title {
    margin: 0; /* Remove default margin for alignment */
}

/* Smaller button style for the header row */
.primary-button-small {
    background-color: var(--color-teal);
    color: white;
    font-size: 0.875rem; /* Smaller font */
    font-weight: 600;
    padding: 0.5rem 1rem; /* Smaller padding */
    border-radius: 1.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
    transition: background-color 150ms ease-in-out;
    flex-shrink: 0; /* Prevents button from shrinking */
}
.primary-button-small:hover {
    background-color: #005f75; 
}


/* Data Grid: Current (Left) | Draft (Middle) */
.data-grid-row {
    display: grid;
    /* Two columns: 50% for current, 50% for pending, side-by-side */
    grid-template-columns: repeat(2, 1fr); 
    gap: 1rem; /* Gap between the two columns */
    padding: 0.5rem 0;
    border-top: 1px solid #ddd;
}
.data-grid-row:first-of-type {
    border-top: none; /* Remove top border for the first row in the section */
}
.data-grid-row-tight {
    padding: 0.25rem 0;
    border-top: none;
    grid-template-columns: 1fr 2fr;
}

.data-cell {
    /* Styles for the individual current or pending column */
    padding: 0 0.5rem;
    word-wrap: break-word; /* Ensure long emails wrap */
}
.data-cell:first-child {
    padding-left: 0; /* Remove left padding for the first cell */
}
.data-cell-pending {

}
.data-cell-pending p {
}

.data-label-block {
    display: block;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    /*text-transform: uppercase;*/
}

.data-pending-label {
    color: rgb(92, 92, 92); 
    font-style: italic;
}

.data-value-current {
    font-weight: 500;
    color: var(--color-black-text);
    margin: 0;
}
.data-value-pending {
    font-weight: 500;
    color: var(--color-black-text);
    margin: 0;
    font-style: italic;
}
.address-line {
    /* For multi-line address, ensure minimal margin between lines */
    margin-bottom: 0.25rem !important;
}

.craftyclick_lookup {
    width: 100%;
    border-radius: 5px;
    font-size: smaller;
}

.hidden-pending {
    /* Class applied by JS to hide the entire row if no pending exists */
    display: none !important;
}

/* Mobile Override: Stack Current and Draft Vertically */
@media (max-width: 600px) {
    .data-grid-row {
        /* Switch to single column layout on small screens */
        grid-template-columns: 1fr;
        gap: 0rem;
    }
    .data-cell {
        padding: 0; /* Reset padding for stacked view */
    }
    .data-cell-pending {
    }
}

.data-cell-pending-flex {
    display: flex;
    justify-content: space-between;  /* push button to the right */
    align-items: center;             /* vertically align text and button */
    gap: 0.5rem;                     /* optional spacing */
}

.data-value-pending {
    margin: 0;                       /* remove default p tag margins */
    flex: 1;                         /* take remaining space */
}

/* --------------------------------------------- */
.section_edit_email, .section_edit_phone, .section_edit_address {
    background-color: var(--color-pink); /* Use a distinct color for the edit view */
    padding: 1.0rem 1.5rem; 
    border-radius: 0rem;
    margin-bottom: 0.75rem;
}

/* Input specific styles (inheriting from form-input, but adjusted for email width) */
.email-input, .phone-input, .address-input  {
    padding: 0.5rem 0.75rem; 
    border: 1px solid #777777; 
    border-radius: 0.5rem; /* Slightly less rounded than pill for better email appearance */
    flex-grow: 1;
    width: 100%; /* Take full width of its cell */
    max-width: 100%;
    background-color: white;
}
.address-input-tight {
    padding: 0.5rem 0.75rem; 
}
.email-input:focus, .phone-input:focus, .address-input:focus {
    outline: none;
    border-color: var(--color-teal);
}
.pref-input {
    padding: 0.5rem 0.75rem; 
    flex-grow: 1;
    background-color: white;
    float: right;
}

/* Adjust the grid for the two input cells */
.edit-grid-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem; /* Larger gap for the editable fields */
    padding: 1rem 0 1.5rem 0;
    border-top: 1px dashed var(--color-primary-dark);
    align-items: end;
}
.edit-grid-row:first-of-type {
    border-top: none; 
}

/* Mobile Override: Stack inputs vertically */
@media (max-width: 600px) {
    .edit-grid-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}


/* --------------------------------------------- */
.consent-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;    
  border: 1px #d0d0d0 solid;
  padding: 0.3em;   
  border-radius: 0.3rem;       
}

.consent-text {
  flex: 1 1 300px;     
}

.consent-options {
  display: flex;
  gap: 1rem;
  flex: 0 0 auto;
}


/* --------------------------------------------- */
/* Desktop / Wide Screens: Question and answers on one line */
.gender-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0rem;
    margin-bottom: 1rem;
}

.gender-options {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.gender-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

/* Thin Screens (Mobile): Stack question on top, grid options 2x2 underneath */
@media (max-width: 600px) {
    .gender-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .gender-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem 1rem;
        width: 100%;
        margin-top: 0.5rem;
    }
}
/* --------------------------------------------- */

.transcript{
  width: 18em;
  max-width: 900px;      /* match video */
  margin-top: 0.75em;
  position: relative;
  margin: 0.75em auto 0em auto;
}

.transcript > summary::after {
  content: " (click to expand)";
}

.transcript[open] > summary::after {
  content: " (click to hide)";
}

@media (max-width: 25em) {
  .transcript {
    width: 100%;
  }
}

.transcript > summary{
  list-style: none;
  cursor: pointer;
  padding: 0.75em 1em;
  border: 1px solid var(--OQS_COL4, black);
  background-color: #ececec;
  border-radius: 5px;
  user-select: none;
}
.transcript > summary::-webkit-details-marker{ display:none; }

.transcript[open] {
  width: 100%;
}

.transcript[open] > summary{
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.transcriptBox{
  border: 1px solid var(--OQS_COL4, black);
  border-top: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 1em;
  max-height: 18em;
  overflow: auto;
  background: #fff;
}

/* --------------------------------------------- */
.question-row{
  display: grid;
  grid-template-columns: 1fr auto; /* question | options */
  column-gap: 2rem;
  row-gap: 0.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.question-text{
  min-width: 0; /* allow wrapping */
  font-weight: 600;
}

.question-options{
  display: grid;
  gap: 0.4rem;
  justify-items: start; /* keep radios left-aligned */
  min-width: 23rem;
}

.option-line{
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* narrow screens: stack */
@media (max-width: 600px){
  .question-row{
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------- */
.details-row{
  display: grid;
  grid-template-columns: 14rem 1fr; /* question | answer */
  gap: 0.25rem;
  align-items: start;
  margin-bottom: 0.5rem;
}

.details-q{
  font-weight: 600;
}

.details-a input{
  width: 100%;
  max-width: 26rem;   /* optional */
}

.details-note{
  margin-left: 0.5rem;
  font-size: 0.9em;
}

.details-gap{
  height: 0.75rem;
}

/* thin screens: stack question above answer */
@media (max-width: 600px){
  .details-row{
    grid-template-columns: 1fr;
  }
  .details-note{
    display: block;
    margin: 0.25rem 0 0 0;
  }
}

/* --------------------------------------------- */

.icon-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px; 
    margin-right: 2px;
    margin-bottom: 2px;
    border-radius: 9999px; 
    background: transparent; 
    border: 1px solid var(--color-teal);
    cursor: pointer; 
    height: 2em;
    text-decoration: none;
    vertical-align: middle;
    margin-left: 5px;
    }

.icon {
    /* Add dimensions to span */
    display: inline-block;
    width: 1.5em;
    height: 1.2em;
    /*padding-right: 2em;    */
    padding: 0em;
    padding-right: 1.7em;
    /* Add background color */
    background-color: var(--color-teal);
    /* Add mask image, use variable to reduce duplication */
    --svg: url('');
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
.icon_white {
    background-color: #ffffff;
}
.icon_small {
    width: 1em;
}

.icon-eye {--svg: url('eye.svg');}
.icon-eye-off {--svg: url('eye-off.svg');}
.icon-leave {--svg: url('sign-out.svg');}
.icon-email {--svg: url('email.svg');}
.icon-phone {--svg: url('phone.svg');}
.icon-home {--svg: url('home.svg');}
.icon-quiz {--svg: url('quiz.svg');}
.icon-return {--svg: url('return.svg');}

/* --------------------------------------------- */

.decline-feedback {
    display:none; 
    margin-left: 20px; 
    padding-top: 0.5em; 
    padding-bottom: 0.5em; 
    color: #333;
}

#other_reason {
    width: 100%;         
    max-width: 500px;     
    height: 80px;        
    padding: 0.5em;        
    margin-top: 0.5em;     
    box-sizing: border-box; 
    resize: vertical;     
}

/* --------------------------------------------- */

@media (max-width: 500px) {
  .page-container {
    padding: 0.5rem;
    margin: 0;
    max-width: 100%;
  }

  .section_grid_layout,
  #section_whoami {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .section_grid_layout > span,
  #section_whoami > span {
    width: 100%;
  }

  .section_grid_layout .primary-button,
  #section_whoami .primary-button {
    display: block;
    width: 100%;
    min-width: 0 !important;
  }

  .section_questionnaires,
  .section_history,
  .section_contact_det,
  .section_password,
  .section_whoami,
  .section_help {
    padding: 1rem;
  }
}

