Add media pesata page and corresponding styles
- Created a new page for calculating weighted averages and graduation votes (`media-pesata.astro`) with a layout and introductory text. - Implemented a script to initialize the media pesata application. - Added CSS styles for the media pesata page and its components. - Updated existing media page (`media.astro`) to include similar structure and functionality. - Introduced error handling for the application initialization script. - Established a comprehensive CSS file for the media pesata application, including styles for various UI elements and responsive design.media-pesata
parent
b595169e3b
commit
55352af0f2
@ -0,0 +1,42 @@
|
||||
---
|
||||
import '@/styles/pages/media-pesata.css'
|
||||
import PageLayout from '../layouts/PageLayout.astro'
|
||||
---
|
||||
|
||||
<PageLayout title="Voto Laurea" description="Calcola la tua media pesata e il voto di laurea seguendo le regole del dipartimento">
|
||||
<div class="media-pesata-container">
|
||||
<h1>Calcolo Media e Voto di Laurea</h1>
|
||||
<p>Calcola la tua media pesata e il voto con cui ti siederai alla discussione di laurea, seguendo le regole del dipartimento di Matematica.</p>
|
||||
|
||||
<div id="media-pesata-app"></div>
|
||||
</div>
|
||||
</PageLayout>
|
||||
|
||||
<script>
|
||||
// Importiamo e inizializziamo l'applicazione
|
||||
import('../client/MediaPesataApp')
|
||||
.then(module => {
|
||||
const { initMediaPesataApp } = module
|
||||
initMediaPesataApp()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.media-pesata-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,49 @@
|
||||
---
|
||||
import '@/styles/pages/media-pesata.css'
|
||||
import PageLayout from '../layouts/PageLayout.astro'
|
||||
---
|
||||
|
||||
<PageLayout title="Voto Laurea" description="Calcola la tua media pesata e il voto di laurea seguendo le regole del dipartimento">
|
||||
<div class="media-pesata-container">
|
||||
<h1>Voto Laurea</h1>
|
||||
<p>Calcola la tua media pesata e il voto con cui ti siederai alla discussione di laurea, seguendo le regole del dipartimento di Matematica.</p>
|
||||
|
||||
<div id="media-pesata-app"></div>
|
||||
</div>
|
||||
</PageLayout>
|
||||
|
||||
<script>
|
||||
// Importiamo e inizializziamo l'applicazione
|
||||
import('../client/MediaPesataApp')
|
||||
.then(module => {
|
||||
const { initMediaPesataApp } = module
|
||||
initMediaPesataApp()
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Errore nel caricamento dell\'applicazione:', error)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.media-pesata-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.media-pesata-container h1 {
|
||||
text-align: center;
|
||||
color: var(--palette-black);
|
||||
margin-bottom: 1rem;
|
||||
font-family: var(--font-display);
|
||||
font-weight: 700;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.media-pesata-container p {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
margin-bottom: 2rem;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,813 @@
|
||||
@layer page {
|
||||
.media-pesata-app {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
min-height: 100vh;
|
||||
background: var(--homepage-whatsphc-bg);
|
||||
}
|
||||
|
||||
.media-pesata-title {
|
||||
text-align: center;
|
||||
color: var(--palette-black);
|
||||
margin-bottom: 2rem;
|
||||
font-family: var(--font-display);
|
||||
font-weight: 700;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
/* Selezione tipo studente */
|
||||
.student-type-selector {
|
||||
background: #fff;
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.student-type-selector h2 {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.radio-group {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.radio-group label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 1.1rem;
|
||||
cursor: pointer;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border: 3px solid var(--palette-black);
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
font-family: var(--font-secondary);
|
||||
font-weight: 600;
|
||||
transition: all 64ms linear;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.radio-group label:hover {
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 5px 5px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.radio-group input[type='radio']:checked + span {
|
||||
background: var(--homepage-projects-bg);
|
||||
}
|
||||
|
||||
.radio-group input[type='radio'] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Counter CFU */
|
||||
.cfu-counter {
|
||||
background: var(--project-card-bg);
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cfu-counter.error {
|
||||
background: #fee;
|
||||
border-color: #dc3545;
|
||||
}
|
||||
|
||||
.cfu-counter h3 {
|
||||
margin: 0;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
color: #d63031;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
font-family: var(--font-secondary);
|
||||
}
|
||||
|
||||
.error-message {
|
||||
background: #ff6b7a;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
color: var(--palette-black);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.error-message p {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Layout principale */
|
||||
.main-content {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.main-content {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sezione selezione corsi */
|
||||
.course-selection {
|
||||
background: #fff;
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.course-selection h2 {
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.course-category {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* Rimozione del vecchio stile per h3 che causava il rettangolo blu */
|
||||
|
||||
.course-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
gap: 0.5rem;
|
||||
margin-top: 1rem;
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.course-button {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 0.75rem;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
background: #f8f9fa;
|
||||
cursor: pointer;
|
||||
transition: all 64ms linear;
|
||||
text-align: left;
|
||||
font-family: var(--font-secondary);
|
||||
}
|
||||
|
||||
.course-button:hover:not(:disabled) {
|
||||
background: var(--homepage-projects-bg);
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.course-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
|
||||
.course-button.selected {
|
||||
background: var(--guide-base);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
transform: translate(1px, 1px);
|
||||
}
|
||||
|
||||
.course-name {
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.3;
|
||||
margin-bottom: 0.25rem;
|
||||
color: var(--palette-black);
|
||||
}
|
||||
|
||||
.course-cfu {
|
||||
font-size: 0.8rem;
|
||||
color: #666;
|
||||
font-weight: bold;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
/* Materia personalizzata */
|
||||
.custom-course {
|
||||
margin-top: 2rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 3px solid var(--palette-black);
|
||||
}
|
||||
|
||||
.custom-course h3 {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.add-custom-btn {
|
||||
background: #1e6733;
|
||||
color: #f4fef7;
|
||||
border: 3px solid var(--palette-black);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 0.75rem 1.5rem;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-secondary);
|
||||
transition: all 64ms linear;
|
||||
}
|
||||
|
||||
.add-custom-btn:hover {
|
||||
background: #2b8b47;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 5px 5px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.custom-form {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.custom-form input {
|
||||
padding: 0.5rem;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
background: #fff;
|
||||
font-family: var(--font-primary);
|
||||
}
|
||||
|
||||
.custom-form input[type='text'] {
|
||||
flex: 2;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.custom-form input[type='number'] {
|
||||
flex: 0 0 80px;
|
||||
}
|
||||
|
||||
.confirm-btn,
|
||||
.cancel-btn {
|
||||
padding: 0.5rem 1rem;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-secondary);
|
||||
transition: all 64ms linear;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background: #28a745;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.confirm-btn:hover {
|
||||
background: #218838;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
background: #6c757d;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.cancel-btn:hover {
|
||||
background: #5a6268;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
/* Sezione corsi selezionati */
|
||||
.selected-courses {
|
||||
background: #fff;
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.selected-courses h2 {
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.no-courses {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
font-style: italic;
|
||||
padding: 2rem;
|
||||
font-family: var(--font-secondary);
|
||||
}
|
||||
|
||||
.courses-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.course-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 1rem;
|
||||
background: var(--guide-base);
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
transition: all 64ms linear;
|
||||
}
|
||||
|
||||
.course-item:hover {
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.course-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.course-info .course-name {
|
||||
font-weight: 600;
|
||||
font-size: 0.9rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-secondary);
|
||||
}
|
||||
|
||||
.course-info .course-cfu {
|
||||
font-size: 0.8rem;
|
||||
color: #666;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.course-grade {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.course-grade input[type='number'] {
|
||||
width: 90px;
|
||||
padding: 0.5rem;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-primary);
|
||||
}
|
||||
|
||||
.lode-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
font-size: 0.8rem;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-secondary);
|
||||
}
|
||||
|
||||
.lode-checkbox.disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.lode-checkbox input[type='checkbox'] {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.remove-btn {
|
||||
background: #d63031;
|
||||
color: white;
|
||||
border: 2px solid var(--palette-black);
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
aspect-ratio: 1;
|
||||
cursor: pointer;
|
||||
font-size: 1.2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 64ms linear;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.remove-btn:hover {
|
||||
background: #b71c1c;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
/* Calcolo e risultati */
|
||||
.calculation-section {
|
||||
background: var(--homepage-principal-bg);
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.calculate-button {
|
||||
background: #1e6733;
|
||||
color: #f4fef7;
|
||||
border: 3px solid var(--palette-black);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 1rem 2rem;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-secondary);
|
||||
cursor: pointer;
|
||||
transition: all 64ms linear;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.calculate-button:hover {
|
||||
background: #2b8b47;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 5px 5px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.calculate-button:active {
|
||||
transform: translate(2px, 2px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.results {
|
||||
background: #fff;
|
||||
border: 3px solid var(--palette-black);
|
||||
border-radius: 6px;
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
padding: 2rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.results h2 {
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
font-size: 1.6rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.results-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
/* Ordine degli elementi: il massimo voto di laurea al centro */
|
||||
.result-item:nth-child(4) {
|
||||
order: -1;
|
||||
grid-column: 1 / -1;
|
||||
justify-self: center;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.result-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
background: var(--guide-base);
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
font-family: var(--font-secondary);
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.result-item.highlight {
|
||||
background: var(--homepage-projects-bg);
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.result-item .label {
|
||||
font-weight: 600;
|
||||
color: var(--palette-black);
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.result-item .value {
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
font-family: var(--font-mono);
|
||||
color: var(--palette-black);
|
||||
}
|
||||
|
||||
.pass-fail-badge {
|
||||
background: var(--color-accent);
|
||||
color: white;
|
||||
padding: 2px 8px;
|
||||
border-radius: 12px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.lode-badge {
|
||||
color: var(--palette-black);
|
||||
font-weight: bold;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.media-pesata-app {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.course-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.course-item {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.course-info {
|
||||
flex: 1 1 100%;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.course-grade {
|
||||
flex: 1 1 auto;
|
||||
justify-content: flex-start;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.course-grade input[type='number'] {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
.remove-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 1rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.custom-form {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.results-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Mantieni il massimo voto centrato anche su mobile */
|
||||
.result-item:nth-child(4) {
|
||||
order: -1;
|
||||
grid-column: 1;
|
||||
justify-self: center;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Layout ultra-compatto per schermi molto piccoli */
|
||||
@media (max-width: 480px) {
|
||||
.course-item {
|
||||
padding: 0.5rem;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.course-info {
|
||||
flex: 1 1 100%;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.course-info .course-name {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.course-info .course-cfu {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.course-grade {
|
||||
flex: 1 1 auto;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.course-grade input[type='number'] {
|
||||
width: 65px;
|
||||
padding: 0.375rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.lode-checkbox {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.remove-btn {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.reset-btn {
|
||||
background: #d63031;
|
||||
color: white;
|
||||
border: 2px solid var(--palette-black);
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 64ms linear;
|
||||
}
|
||||
|
||||
.reset-btn:hover {
|
||||
background: #b71c1c;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 2px 2px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.cfu-info {
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
margin: 0.25rem 0 0 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.error-text {
|
||||
color: #d63031;
|
||||
font-weight: 600;
|
||||
margin: 0.5rem 0 0 0;
|
||||
}
|
||||
|
||||
/* Category headers collapsible */
|
||||
.category-header {
|
||||
width: 100%;
|
||||
background: #e4c5ff;
|
||||
border: 2px solid var(--palette-black);
|
||||
border-radius: 4px;
|
||||
padding: 0.5rem 1rem;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
transition: all 64ms linear;
|
||||
margin-bottom: 0.5rem;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.category-header:hover {
|
||||
background: #d9b3ff;
|
||||
transform: translate(-1px, -1px);
|
||||
box-shadow: 1px 1px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
.category-header h3 {
|
||||
margin: 0;
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
color: var(--palette-black);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.toggle-icon {
|
||||
font-size: 1rem;
|
||||
color: var(--palette-black);
|
||||
transition: transform 150ms ease;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.toggle-icon.expanded {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/* Calculate button */
|
||||
.calculate-section {
|
||||
text-align: center;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
.calculate-btn {
|
||||
background: #1e6733;
|
||||
color: #f4fef7;
|
||||
border: var(--border-large);
|
||||
border-radius: 6px;
|
||||
padding: 0.75rem 1.5rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 64ms linear;
|
||||
font-family: var(--font-primary);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.calculate-btn:hover {
|
||||
background: #2b8b47;
|
||||
transform: translate(-2px, -2px);
|
||||
box-shadow: 4px 4px 0 0 var(--palette-black);
|
||||
}
|
||||
|
||||
/* Info section */
|
||||
.info-section {
|
||||
background: var(--color-accent-light);
|
||||
border: var(--border-large);
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
.info-section h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
color: var(--palette-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.info-content h4 {
|
||||
color: var(--palette-black);
|
||||
font-weight: 600;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.info-content ul {
|
||||
margin-bottom: 1rem;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.info-content li {
|
||||
margin-bottom: 0.5rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Gestione testi lunghi su schermi più piccoli */
|
||||
@media (max-width: 480px) {
|
||||
.result-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.result-item .label {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.result-item .value {
|
||||
align-self: flex-end;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue