Files
firka-extension/timetable/timetable.css
2025-09-08 21:51:55 +02:00

960 lines
18 KiB
CSS

* {
box-sizing:border-box;
margin:0;
padding:0;
font-family:'Montserrat',sans-serif;
}
body {
margin:0;
padding:0;
color:var(--text-primary);
background-color:var(--background) !important;
min-height:100vh;
font-size:16px;
}
@media (max-width:768px) {
body {
font-size:14px;
}
}.kreta-container {
min-height:100vh;
display:flex;
flex-direction:column;
}
.kreta-header {
padding:clamp(1rem,3vw,2rem);
display:grid;
grid-template-columns:minmax(300px,400px) 1fr minmax(200px,300px);
align-items:center;
gap:1rem;
}
@media (max-width:1200px) {
.kreta-header {
grid-template-columns:minmax(250px,350px) 1fr minmax(180px,250px);
}
}@media (max-width:768px) {
.kreta-header {
grid-template-columns:1fr auto auto;
grid-template-areas:"school toggle user"
"nav nav nav";
padding:1rem;
gap:0.5rem;
}
}.school-info {
margin:0;
}
@media (max-width:768px) {
.school-info {
grid-area:school;
max-width:none;
display:flex;
align-items:center;
gap:0.5rem;
}
}.logo-text {
color:var(--text-primary);
font-size:24px;
font-weight:600;
margin:0 0 0.5rem;
display:flex;
align-items:center;
}
@media (max-width:768px) {
.logo-text {
margin:0;
font-size:20px;
}
}.logo {
width:24px;
border-radius:8px;
margin-right:0.5rem;
}
.school-details {
color:var(--text-secondary);
font-size:14px;
}
.school-details span {
display:block;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
max-width:300px;
}
@media (max-width:768px) {
.school-details span {
max-width:200px;
}
.school-details {
font-size:12px;
}
}.user-profile {
position:relative;
justify-self:flex-end;
}
@media (max-width:768px) {
.user-profile {
grid-area:user;
}
}.user-dropdown-btn {
display:flex;
align-items:center;
gap:1rem;
background:none;
border:none;
cursor:pointer;
padding:0.5rem;
border-radius:8px;
transition:background-color 0.2s;
}
.user-dropdown-btn:hover {
background:var(--card-card);
}
.user-info {
text-align:right;
}
.user-dropdown {
position:absolute;
top:100%;
right:0;
margin-top:0.5rem;
background:var(--card-card);
border-radius:12px;
box-shadow:0 4px 6px -1px var(--accent-shadow);
width:200px;
display:none;
z-index:1000;
}
.user-dropdown.show {
display:block;
animation:dropdownShow 0.2s ease;
}
.dropdown-item {
display:flex;
align-items:center;
gap:0.75rem;
padding:0.75rem 1rem;
color:var(--text-primary);
text-decoration:none;
transition:background-color 0.2s;
}
.dropdown-item:hover {
background:var(--button-secondaryFill);
}
.kreta-main {
flex:1;
padding:clamp(1rem,3vw,2rem);
max-width:1400px;
margin:0 auto;
width:100%;
}
.k-overlay,.k-widget.k-window {
display:none !important;
}
.card {
border-radius:24px;
overflow:hidden;
animation:fadeIn 0.3s ease;
margin-bottom:1rem;
}
.timetable-grid {
display:grid;
grid-template-columns:80px repeat(5,1fr);
overflow-x:auto;
}
.grid-header {
padding:12px;
text-align:center;
font-weight:600;
color:var(--text-primary);
border-radius:12px;
min-width:120px;
}
.grid-header:first-child {
min-width:80px;
}
.grid-header {
display:flex;
justify-content:space-between;
padding:0 10px;
}
.day-name {
text-align:left;
color:var(--text-primary);
font-family:Montserrat;
font-size:16px;
font-style:normal;
font-weight:600;
line-height:normal;
}
.day-date {
text-align:right;
color:var(--text-secondary);
font-family:Figtree;
font-size:16px;
font-style:normal;
font-weight:500;
line-height:130%;
}
.notice-header {
min-width:80px;
}
.notice-slot {
padding:4px 8px;
min-height:auto;
}
.special-day-notice {
background:#F99F50;
color:white;
padding:8px 12px;
border-radius:8px;
text-align:center;
box-shadow:0 1px 3px rgba(0,0,0,0.1);
font-size:0.85rem;
}
.special-day-notice .special-day-title {
font-weight:600;
margin-bottom:2px;
}
.special-day-notice .special-day-subtitle {
font-size:0.75rem;
opacity:0.9;
font-weight:400;
}
.time-slot {
padding:12px;
text-align:center;
color:var(--text-secondary);
font-size:14px;
border-radius:12px;
}
.lesson-slot {
min-height:100px;
border-radius:12px;
padding:8px;
transition:transform 0.2s ease;
display:grid;
grid-gap:16px;
}
.lesson-slot.empty-slot {
border: 2px dashed var(--text-secondary);
opacity: 0.3;
background: transparent;
margin: 8px;
border-radius: 16px;
min-height: 84px;
}
.empty-lesson-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
font-size: 14px;
opacity: 0.5;
}
.lesson-card {
display:flex;
padding:16px;
flex-direction:column;
align-items:flex-start;
gap:10px;
align-self:stretch;
border-radius:16px;
background:var(--card-card);
box-shadow:0px 1px var(--shadow-blur,2px) 0px var(--accent-shadow);
transition:all 0.3s cubic-bezier(0.4,0,0.2,1);
transform:translateY(0);
}
.lesson-card:hover {
transform:translateY(-4px);
box-shadow:0 8px 12px var(--accent-shadow);
}
.lesson-card.substituted {
background:var(--warning-card);
}
.lesson-card.cancelled {
border-radius:16px;
background:var(--card-translucent);
}
.lesson-card.cancelled .lesson-subject,.lesson-card.cancelled .lesson-teacher,.lesson-card.cancelled .lesson-room {
opacity:0.5;
text-decoration:line-through;
}
.lesson-subject {
align-self:stretch;
color:var(--text-primary);
font-family:Montserrat;
font-size:16px;
font-style:normal;
font-weight:600;
line-height:normal;
}
.lesson-teacher {
color:var(--text-secondary);
font-family:Figtree;
font-size:16px;
font-style:normal;
font-weight:500;
line-height:130%;
}
.lesson-bottom {
margin-top:auto;
display:flex;
justify-content:space-between;
align-items:flex-end;
width:100%;
}
.lesson-room {
background:var(--accent-15);
color:var(--text-secondary);
padding:4px 8px;
border-radius:12px;
font-size:12px;
font-weight:500;
}
.lesson-card.substituted .lesson-bottom .lesson-room {
background:var(--warning-15);
}
.lesson-time {
color:var(--text-secondary);
font-size:12px;
font-weight:500;
margin-left:auto;
text-align:right;
min-width:45px;
}
.lesson-indicators {
position:absolute;
top:8px;
right:8px;
display:flex;
gap:4px;
}
.lesson-indicator {
display:flex;
align-items:center;
justify-content:center;
width:28px;
height:28px;
border-radius:50%;
background:var(--accent-15);
color:var(--accent-accent);
}
.lesson-indicator.homework-indicator {
background:var(--accent-15);
color:var(--accent-accent);
}
.lesson-indicator.test-indicator {
background:var(--warning-15);
color:var(--warning-accent);
}
.lesson-indicator .material-icons-round {
font-size:18px;
}
.week-controls {
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
margin:16px auto;
background:var(--card-card);
border-radius:24px;
max-width:800px;
padding:20px;
}
.week-selector-container {
width:100%;
position:relative;
}
.expand-week-view-btn {
display:flex;
align-items:center;
justify-content:center;
width:40px;
height:40px;
border:none;
border-radius:8px;
background:var(--button-secondaryFill);
color:var(--text-primary);
cursor:pointer;
transition:all 0.2s ease;
margin-left:12px;
}
.expand-week-view-btn:hover {
background:var(--accent-15);
color:var(--accent-accent);
transform:scale(1.05);
}
.expand-week-view-btn .material-icons-round {
font-size:18px;
}
.week-selector {
display:flex;
align-items:center;
justify-content:center;
gap:12px;
max-width:100%;
}
.week-nav-btn {
display:flex;
align-items:center;
justify-content:center;
width:40px;
height:40px;
border:none;
border-radius:8px;
background:var(--button-secondaryFill);
color:var(--text-primary);
cursor:pointer;
transition:all 0.2s ease;
}
.week-nav-btn:hover:not(:disabled) {
background:var(--accent-15);
color:var(--accent-accent);
transform:scale(1.05);
}
.week-nav-btn .material-icons-round {
font-size:20px;
}
.week-display {
display:flex;
gap:8px;
align-items:center;
}
.week-cell {
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
width:60px;
height:50px;
border:2px solid var(--button-secondaryFill);
border-radius:8px;
background:var(--button-secondaryFill);
color:var(--text-primary);
font-family:inherit;
font-weight:500;
cursor:pointer;
transition:all 0.2s ease;
position:relative;
gap:2px;
}
.week-cell:hover {
background:var(--accent-15);
border-color:var(--accent-accent);
color:var(--accent-accent);
transform:scale(1.05);
}
.week-cell.selected {
background:var(--accent-accent);
border-color:var(--accent-accent);
color:white;
font-weight:600;
}
.week-cell.selected:hover {
background:var(--accent-accent);
transform:scale(1.05);
}
.week-cell.current-week {
border-color:var(--accent-accent);
box-shadow:0 0 0 1px var(--accent-accent);
}
.week-cell.current-week.selected {
box-shadow:0 0 0 2px rgba(255,255,255,0.5);
}
.week-number {
font-size:14px;
font-weight:inherit;
}
.current-indicator {
font-size:8px;
color:var(--accent-accent);
line-height:1;
}
.week-cell.selected .current-indicator {
color:white;
}
.week-tooltip {
position:absolute;
background:var(--card-card);
border:1px solid var(--border-border);
border-radius:8px;
padding:8px 12px;
font-size:14px;
color:var(--text-primary);
box-shadow:0 4px 12px rgba(0,0,0,0.15);
pointer-events:none;
opacity:0;
transition:opacity 0.2s ease;
z-index:1000;
white-space:nowrap;
}
.week-tooltip.show {
opacity:1;
}
.week-modal {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.5);
z-index:10000;
display:flex;
align-items:center;
justify-content:center;
padding:20px;
}
.week-modal-content {
background:var(--card-card);
border-radius:16px;
max-width:1000px;
max-height:70vh;
width:100%;
overflow:hidden;
box-shadow:0 20px 40px rgba(0,0,0,0.3);
}
.week-modal-header {
display:flex;
align-items:center;
justify-content:space-between;
padding:20px 24px;
border-bottom:1px solid var(--border-border);
}
.week-modal-grid {
display:grid;
grid-template-columns:repeat(13,1fr);
gap:8px;
padding:20px;
max-height:calc(70vh - 80px);
overflow-y:auto;
}
.modal-week-cell {
width:40px;
height:40px;
font-size:12px;
}
@media (max-width:768px) {
.week-modal-content {
max-width:95vw;
max-height:80vh;
}
.week-modal-grid {
grid-template-columns:repeat(10,1fr);
gap:6px;
padding:16px;
max-height:calc(80vh - 80px);
}
.modal-week-cell {
width:35px;
height:35px;
font-size:11px;
}
}.week-modal-header h3 {
margin:0;
color:var(--text-primary);
font-size:20px;
font-weight:600;
}
.week-modal-close {
display:flex;
align-items:center;
justify-content:center;
width:40px;
height:40px;
border:none;
border-radius:8px;
background:var(--button-secondaryFill);
color:var(--text-primary);
cursor:pointer;
transition:all 0.2s ease;
}
.week-modal-close:hover {
background:var(--accent-15);
color:var(--accent-accent);
}
.week-modal-close .material-icons-round {
font-size:24px;
}
.week-modal-grid {
display:grid;
grid-template-columns:repeat(13,1fr);
gap:8px;
padding:24px;
max-height:70vh;
overflow-y:auto;
}
.week-modal-grid .week-cell {
width:60px;
height:50px;
font-size:14px;
}
@media (max-width:1200px) {
.week-modal-grid {
grid-template-columns:repeat(10,1fr);
}
}@media (max-width:768px) {
.week-modal-grid {
grid-template-columns:repeat(7,1fr);
gap:6px;
}
.week-modal-grid .week-cell {
width:50px;
height:45px;
font-size:12px;
}
.week-modal-content {
margin:10px;
}
.week-modal-header {
padding:16px 20px;
}
.week-modal-grid {
padding:20px;
}
}@media (max-width:768px) {
.week-grid {
grid-template-columns:repeat(10,1fr);
gap:6px;
}
.week-cell {
width:40px;
height:35px;
font-size:12px;
}
.week-controls {
max-width:600px;
padding:15px;
}
}@media (max-width:480px) {
.week-grid {
grid-template-columns:repeat(8,1fr);
gap:4px;
}
.week-cell {
width:35px;
height:30px;
font-size:11px;
}
.week-controls {
max-width:400px;
padding:12px;
}
}.day-navigation {
display:none;
align-items:center;
justify-content:space-between;
margin-bottom:1rem;
padding:0 1rem;
}
.day-nav-btn {
background:var(--card-card);
border:1px solid var(--accent-15);
border-radius:12px;
padding:12px 16px;
color:var(--text-secondary);
cursor:pointer;
transition:all 0.2s ease;
display:flex;
align-items:center;
gap:8px;
}
.day-nav-btn:hover {
background:var(--accent-15);
color:var(--accent-accent);
}
.current-day-info {
text-align:center;
flex:1;
margin:0 1rem;
}
.current-day-name {
font-size:18px;
font-weight:600;
color:var(--text-primary);
margin-bottom:4px;
}
.current-day-date {
font-size:14px;
color:var(--text-secondary);
}
@media (max-width:1024px) {
.timetable-grid {
grid-template-columns:60px repeat(5,minmax(200px,1fr));
}
.lesson-slot {
min-height:80px;
}
}@media (max-width:768px) {
.day-navigation {
display:flex;
}
.timetable-container {
overflow:hidden;
}
.timetable-grid {
grid-template-columns:60px 1fr;
overflow:visible;
}
.grid-header:not(:first-child) {
display:none;
}
.grid-header.active {
display:flex !important;
}
.notice-slot {
display:none;
}
.notice-slot.active {
display:block;
}
.lesson-slot {
display:none;
}
.lesson-slot.active {
display:block;
}
.lesson-card {
padding:8px;
}
.lesson-subject {
font-size:14px;
}
.lesson-teacher,.lesson-room {
font-size:12px;
}
}.lesson-modal {
display:none;
position:fixed;
top:0;
left:0;
right:0;
bottom:0;
background:rgba(0,0,0,0.5);
z-index:1000;
padding:1rem;
align-items:center;
justify-content:center;
opacity:0;
transition:opacity 0.3s ease;
}
.lesson-modal.show {
display:flex !important;
opacity:1;
}
.modal-content {
background:var(--card-card);
border-radius:24px;
border-width:0 !important;
width:100%;
max-width:500px;
max-height:90vh;
overflow-y:auto;
position:relative;
transform:translateY(20px);
opacity:0;
transition:all 0.3s ease;
}
.lesson-modal.show .modal-content {
transform:translateY(0);
opacity:1;
}
.modal-header {
display:flex;
justify-content:space-between;
align-items:center;
padding:1.5rem;
background:var(--button-secondaryFill);
}
.modal-title {
font-size:18px;
font-weight:600;
color:var(--text-primary);
}
.modal-close {
background:none;
border:none;
color:var(--text-secondary);
cursor:pointer;
padding:0.5rem;
border-radius:8px;
transition:all 0.2s ease;
}
.modal-close:hover {
background:var(--background);
color:var(--text-primary);
}
.modal-body {
padding:1.5rem;
background-color:var(--button-secondaryFill);
}
.lesson-details {
display:flex;
flex-direction:column;
gap:1rem;
}
.detail-item {
display:flex;
align-items:center;
gap:0.75rem;
}
.detail-label {
color:var(--text-secondary);
font-weight:500;
min-width:80px;
}
.detail-value {
color:var(--text-primary);
}
.modal-section {
margin-top:1.5rem;
padding-top:1.5rem;
border-top:1px solid var(--background-0);
}
.modal-section h4 {
display:flex;
align-items:center;
gap:0.5rem;
color:var(--text-primary);
font-size:16px;
margin-bottom:0.75rem;
}
.homework-section h4 {
color:var(--accent-accent);
}
.test-section h4 {
color:var(--warning-accent);
}
.homework-content,.test-content {
background:var(--card-translucent);
padding:1rem;
border-radius:8px;
color:var(--text-primary);
}
.detail-item .line-through {
text-decoration:line-through;
}
.detail-item.hidden {
display:none;
}
@keyframes fadeIn {
from {
opacity:0;
transform:translateY(-20px);
}
to {
opacity:1;
transform:translateY(0);
}
}@keyframes dropdownShow {
from {
opacity:0;
transform:translateY(-10px) scale(0.95);
}
to {
opacity:1;
transform:translateY(0) scale(1);
}
}@keyframes modalShow {
from {
opacity:0;
transform:scale(0.9);
}
to {
opacity:1;
transform:scale(1);
}
}@media (max-width:768px) {
.kreta-header {
flex-direction:column;
text-align:center;
}
.user-info {
text-align:center;
}
.lesson-cell {
min-width:200px;
}
}::-webkit-scrollbar {
width:8px;
height:8px;
}
::-webkit-scrollbar-track {
background:var(--background);
}
::-webkit-scrollbar-thumb {
background:var(--text-secondary);
border-radius:4px;
}
::-webkit-scrollbar-thumb:hover {
background:var(--text-primary);
}
.grid-header.special-day {
background:linear-gradient(135deg,#F99F50,#FF8C42);
color:white;
position:relative;
}
.special-day-indicator {
display:block;
font-size:0.7rem;
font-weight:500;
margin-top:2px;
opacity:0.9;
text-align:center;
}
.special-day-card {
background:#F99F50;
color:white;
padding:12px;
border-radius:8px;
margin:4px;
text-align:center;
cursor:pointer;
transition:all 0.2s ease;
box-shadow:0 2px 4px rgba(0,0,0,0.1);
}
.special-day-card:hover {
transform:translateY(-2px);
box-shadow:0 4px 8px rgba(0,0,0,0.15);
}
.special-day-title {
font-weight:600;
font-size:1.1rem;
margin-bottom:4px;
}
.special-day-subtitle {
font-size:0.9rem;
opacity:0.9;
font-weight:400;
}
.week-select {
min-width:200px;
max-width:300px;
}
@media (max-width:768px) {
.special-day-indicator {
font-size:0.6rem;
}
.special-day-card {
padding:8px;
margin:2px;
}
.special-day-title {
font-size:0.8rem;
}
.special-day-subtitle {
font-size:0.7rem;
}
}.more-link {
margin-top:auto;
display:inline-flex;
align-items:center;
gap:0.5rem;
color:var(--accent-accent);
text-decoration:none;
font-weight:500;
padding-top:16px;
transition:gap 0.2s ease;
font-size:clamp(0.875rem,1.5vw,1rem);
}