/**
 * ESES Assessment Tool v3.0.0 - Styles
 * Larger fonts, white background, toolbar, modal styles
 */

#eses-tool-root {
    font-family: 'Source Serif 4', Georgia, serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 17px;
    color: #1f2937;
    background: #ffffff;
}

#eses-tool-root * {
    box-sizing: border-box;
}

/* Toolbar */
.eses-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    padding: 14px 24px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.eses-toolbar button {
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Source Serif 4', Georgia, serif;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eses-toolbar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.eses-toolbar .btn-save { background: #10b981; color: white; }
.eses-toolbar .btn-save:hover { background: #059669; }
.eses-toolbar .btn-load { background: #3b82f6; color: white; }
.eses-toolbar .btn-load:hover { background: #2563eb; }
.eses-toolbar .btn-pdf { background: #ef4444; color: white; }
.eses-toolbar .btn-pdf:hover { background: #dc2626; }
.eses-toolbar .btn-new { background: #8b5cf6; color: white; }
.eses-toolbar .btn-new:hover { background: #7c3aed; }

.eses-toolbar-status {
    margin-left: auto;
    font-size: 15px;
    color: #6b7280;
}

.eses-toolbar-status.saving { color: #f59e0b; }
.eses-toolbar-status.saved { color: #10b981; }

/* Modal Overlay */
.eses-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eses-modal {
    background: white;
    border-radius: 14px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.eses-modal h2 {
    font-size: 26px;
    margin: 0 0 16px 0;
    color: #1f2937;
    font-family: 'Source Serif 4', Georgia, serif;
}

.eses-modal p {
    font-size: 17px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.eses-modal input {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: 'Source Serif 4', Georgia, serif;
}

.eses-modal input:focus {
    outline: none;
    border-color: #3b82f6;
}

.eses-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.eses-modal-buttons button {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Source Serif 4', Georgia, serif;
}

.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }

/* Saved Assessment List */
.eses-assessment-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    max-height: 400px;
    overflow-y: auto;
}

.eses-assessment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.15s;
}

.eses-assessment-item:hover {
    background: #f9fafb;
    border-color: #3b82f6;
}

.eses-assessment-info {
    flex: 1;
    cursor: pointer;
}

.eses-assessment-info h3 {
    font-size: 17px;
    margin: 0 0 4px 0;
    color: #1f2937;
}

.eses-assessment-info p {
    font-size: 14px;
    margin: 0;
    color: #6b7280;
}

.btn-delete {
    padding: 6px 12px;
    font-size: 14px;
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-delete:hover {
    background: #fecaca;
}

/* Toast Messages */
.eses-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    padding: 14px 22px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Source Serif 4', Georgia, serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.eses-toast-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.eses-toast-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Print styles */
@media print {
    .eses-toolbar,
    .eses-sidebar,
    button {
        display: none !important;
    }
    #eses-tool-root {
        font-size: 12pt;
    }
}

/* Accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
