/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.app-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

header {
    border-bottom: 2px solid #e0e6ec;
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    color: #8a1e82;
    font-size: 2em;
    margin: 0;
}

/* Questionnaire Styling */
.question-block {
    margin-bottom: 35px;
}

.question-text {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #222;
}

.section-color-1 { color: #58acc4; } 
.section-color-2 { color: #ea515a; } 
.section-color-3 { color: #f8ac33; }
.section-color-4 { color: #776a6b; } 
.section-color-5 { color: #5a6978; } 

.options-container label {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.options-container label:hover {
    background-color: #f0f4f7;
}

input[type="radio"], input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
}

textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
}

/* --- UPDATED BUTTON CONTAINER STYLE --- */
.action-buttons {
    display: inline-grid; /* Use grid layout, inline to respect text-align: center */
    grid-template-columns: 1fr 1fr; /* Create two columns of equal fraction (1fr) */
    gap: 40px; /* This creates the space between the buttons */
    margin-top: 30px;
}

/* Generic Button Styling */
.action-buttons button,
#privacy-modal #acknowledge-btn {
    background-color: #8a1e82;
    color: white;
    border: 1px solid #8a1e82;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.action-buttons button {
    margin-right: 0; /* Margin is now handled by the 'gap' property in the grid */
}

.action-buttons button:hover,
#privacy-modal #acknowledge-btn:hover {
    background-color: #631a5e;
}

/* Styles for the second button */
.action-buttons button:last-child {
    background-color: #fff;
    border: 1px solid #8a1e82;
    color: #8a1e82;
}

.action-buttons button:last-child:hover {
    background-color: #8a1e82;
    color: #fff;
}

/* This class groups the note and buttons */
.footer-controls {
    flex-grow: 1; /* Allows this element to expand and fill available space */
    text-align: center;
}

/* Logo Placeholder Styling */
#logo-placeholder {
    margin-left: auto; /* Pushes only the logo to the right */
    width: 120px;
    height: 50px;
    background-color: #fff;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    color: #666;
    flex-shrink: 0;
}

#logo-placeholder::before {
    background-image: "https://www.novartis.com/themes/custom/polaris/logo.svg";
}

/* Site-wide Disclaimer Footer */
.site-footer {
    text-align: center;
    margin-top: 60px;
    color: #888;
    font-size: 0.85em;
    border-top: 2px solid #e0e6ec;
}

.footer-text {
    margin-top: 30px;
}

.site-footer a {
    text-decoration: none; /* Removes the underline from the logo link */
}

/* Privacy Modal Styling */
#privacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#privacy-modal {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#privacy-modal h2 {
    margin-top: 0;
    color: #005a9c;
}

#privacy-modal #acknowledge-btn {
    margin-top: 20px;
    background-color: #8a1e82;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-right: 10px;
}

#privacy-modal #acknowledge-btn:hover {
    background-color: #218838;
}

.thank-you-note {
    margin-top: 20px;
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #555;
    margin: 0 0 15px 0; /* Adds space below the text */
}

@media (max-width: 600px) {
    .action-footer {
        flex-direction: column; /* Stack the controls and logo vertically */
        align-items: center;   /* Center the stacked items */
        gap: 25px;             /* Add space between the controls and the logo */
    }

    .action-buttons {
        display: flex;
        flex-direction: column; /* Stack the two buttons vertically */
        align-items: center;
        gap: 10px;             /* Add space between the buttons */
    }

    .action-buttons button {
        margin-right: 0;       /* Remove side margin for stacked buttons */
        width: 100%;           /* Make buttons take up more width */
        max-width: 250px;
    }
}

