/* Global Variables */
:root {
    --primary-color: #2196F3;
    --secondary-color: #1976d2;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #F44336;
    --text-color: #333;
    --border-color: #ddd;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.nav-wrapper {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.nav-buttons {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
}

.nav-btn {
    text-decoration: none;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: #e3f2fd;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Table Layout */
.checklist-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    width: 100%;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: white;
}

/* Column Widths */
th:nth-child(1) { width: 22%; }
th:nth-child(2) { width: 13%; }
th:nth-child(3) { width: 45%; }
th:nth-child(4) { width: 20%; }

/* Table Headers */
thead {
    background-color: var(--primary-color);
}

thead th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 15px;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    vertical-align: middle;
}

thead th:last-child {
    border-right: none;
}

/* Table Cells */
td {
    padding: 12px 15px;
    vertical-align: middle;
    line-height: 1.4;
    border-right: 1px solid var(--border-color);
}

tr {
    border-bottom: 1px solid var(--border-color);
}

td:last-child {
    border-right: none;
}

/* Section Headers */
.section-header {
    border-bottom: none;
}

.section-header td {
    background: #e3f2fd;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

/* Response Column */
td:nth-child(4) {
    background-color: #fafafa;
    padding: 0;
    min-width: 160px;
    max-width: 160px;
    width: 160px !important;
    vertical-align: middle;
    text-align: center;
}

/* Button Container */
.btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    margin: 12px auto;
    padding: 0 15px;
}

/* Yes/No Buttons */
.btn {
    flex: 0 0 auto;
    width: 58px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
    box-shadow: 6px 6px 6px 6px white;
}

.btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    box-shadow: none;
}

.btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.form-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.form-actions button i {
    font-size: 16px;
}

.form-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Primary and Secondary Button Styles */
.btn-primary,
.btn-secondary {
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.btn-primary:active {
    background-color: #0d47a1;
    transform: translateY(1px);
}

.btn-primary:disabled {
    background-color: #90caf9;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.15);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #e3f2fd;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.25);
}

.btn-secondary:active {
    background-color: #bbdefb;
    transform: translateY(1px);
}

.btn-secondary:disabled {
    color: #90caf9;
    border-color: #90caf9;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Email form */
#emailForm {
    background-color: #f5f7fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

#emailForm .form-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#emailForm input {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#emailStatus {
    margin-top: 10px;
    font-size: 14px;
}

/* Accessibility improvements */
button {
    cursor: pointer;
}

button:focus, 
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Score Display */
.score-display {
    max-width: 600px;
    margin: 30px auto;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    display: none;
}

.high-score { border-left: 4px solid var(--success-color); }
.medium-score { border-left: 4px solid var(--warning-color); }
.low-score { border-left: 4px solid var(--danger-color); }

.score-value {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

.score-details,
.score-info {
    color: #666;
    margin: 10px 0;
}

.score-message {
    font-weight: 500;
    margin-top: 20px;
    color: var(--text-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Enhanced modal styles */
@media screen and (max-width: 900px) {
    .modal-content {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 20px);
    }
}

/* Chart container */
.chart-container {
    margin: 2rem auto;
    height: 300px;
    max-width: 500px;
    position: relative;
}

/* Loading indicator */
#loadingIndicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .checklist-container {
        overflow-x: auto;
        border: 1px solid var(--border-color);
    }

    table {
        min-width: 900px;
    }

    thead th {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

/* Print Styles */
@media print {
    .nav-wrapper,
    .form-actions,
    .btn-container {
        display: none;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .checklist-container {
        box-shadow: none;
    }

    th {
        background: white !important;
        color: black !important;
        border: 1px solid #000;
    }

    td {
        border: 1px solid #000;
    }

    .section-header td {
        background: white !important;
        border: 1px solid #000;
        font-weight: bold;
    }
} 