Files
calendar/styles.css
Connor Johnstone e23278d71e Implement fixed-height month view rows with event overflow handling
- Change calendar grid to use equal row heights instead of min-height on cells
- Add "+n more" indicator for days with too many events to display
- Limit visible events to fit available space (default 3 events per day)
- Add window resize handler to recalculate event limits dynamically
- Remove gaps between calendar rows for cleaner appearance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 12:27:24 -04:00

1718 lines
32 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f8f9fa;
color: #333;
line-height: 1.6;
}
.app {
min-height: 100vh;
display: flex;
flex-direction: row;
}
.login-layout {
min-height: 100vh;
display: flex;
flex-direction: column;
width: 100%;
}
/* Sidebar Styles */
.app-sidebar {
width: 280px;
min-height: 100vh;
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
flex-direction: column;
box-shadow: 2px 0 8px rgba(0,0,0,0.1);
position: fixed;
left: 0;
top: 0;
z-index: 100;
}
.sidebar-header {
padding: 2rem 1.5rem 1.5rem;
border-bottom: 1px solid rgba(255,255,255,0.2);
}
.sidebar-header h1 {
margin: 0 0 1rem 0;
font-size: 1.8rem;
font-weight: 600;
text-align: center;
}
.user-info {
text-align: center;
margin-bottom: 0.5rem;
}
.user-info .username {
font-size: 1.1rem;
font-weight: 600;
color: white;
margin-bottom: 0.25rem;
}
.user-info .server-url {
font-size: 0.8rem;
color: rgba(255,255,255,0.7);
word-break: break-all;
line-height: 1.2;
}
.user-info.loading {
font-size: 0.9rem;
color: rgba(255,255,255,0.6);
font-style: italic;
}
.sidebar-nav {
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sidebar-nav .nav-link {
color: white;
text-decoration: none;
padding: 0.75rem 1rem;
border-radius: 8px;
transition: all 0.2s;
font-weight: 500;
display: flex;
align-items: center;
}
.sidebar-nav .nav-link:hover {
background-color: rgba(255,255,255,0.15);
transform: translateX(4px);
}
.sidebar-nav .nav-link.active {
background-color: rgba(255,255,255,0.2);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.calendar-list {
flex: 1;
padding: 1rem;
border-top: 1px solid rgba(255,255,255,0.1);
}
.calendar-list h3 {
color: white;
font-size: 1rem;
font-weight: 600;
margin: 0 0 1rem 0;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.calendar-list ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.calendar-list li {
display: flex;
align-items: center;
padding: 0.5rem 0.75rem;
background: rgba(255,255,255,0.1);
border-radius: 6px;
transition: all 0.2s;
cursor: pointer;
gap: 0.75rem;
}
.calendar-list li:hover {
background: rgba(255,255,255,0.15);
transform: translateX(2px);
}
.calendar-color {
width: 16px;
height: 16px;
border-radius: 50%;
flex-shrink: 0;
border: 2px solid rgba(255,255,255,0.3);
transition: all 0.2s;
cursor: pointer;
position: relative;
}
.calendar-list li:hover .calendar-color {
border-color: rgba(255,255,255,0.6);
transform: scale(1.1);
}
.color-picker {
position: absolute;
top: 100%;
left: 0;
background: white;
border-radius: 8px;
padding: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
z-index: 1000;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 6px;
min-width: 120px;
border: 1px solid rgba(0,0,0,0.1);
}
.color-option {
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid rgba(0,0,0,0.1);
cursor: pointer;
transition: all 0.2s;
}
.color-option:hover {
transform: scale(1.2);
border-color: rgba(0,0,0,0.3);
}
.color-option.selected {
border-color: #333;
border-width: 3px;
transform: scale(1.1);
}
.color-picker-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
}
.calendar-name {
color: white;
font-size: 0.9rem;
font-weight: 500;
flex: 1;
}
.no-calendars {
padding: 1rem;
text-align: center;
color: rgba(255,255,255,0.6);
font-size: 0.9rem;
font-style: italic;
border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer {
padding: 1rem;
border-top: 1px solid rgba(255,255,255,0.1);
}
.app-main {
flex: 1;
margin-left: 280px;
padding: 2rem;
max-width: calc(100% - 280px);
width: calc(100% - 280px);
box-sizing: border-box;
}
/* Authentication Forms */
.login-container, .register-container {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
}
.login-form, .register-form {
background: white;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
width: 100%;
max-width: 400px;
}
.login-form h2, .register-form h2 {
text-align: center;
margin-bottom: 2rem;
color: #333;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
color: #555;
}
.form-group input {
width: 100%;
padding: 0.75rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1rem;
transition: border-color 0.2s;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.form-group input:disabled {
background-color: #f5f5f5;
cursor: not-allowed;
}
.login-button, .register-button {
width: 100%;
padding: 0.75rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 4px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.login-button:hover, .register-button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.login-button:disabled, .register-button:disabled {
background: #ccc;
transform: none;
cursor: not-allowed;
}
.error-message {
background-color: #f8d7da;
color: #721c24;
padding: 0.75rem;
border-radius: 4px;
margin-bottom: 1rem;
border: 1px solid #f5c6cb;
}
.auth-links {
text-align: center;
margin-top: 2rem;
color: #666;
}
.auth-links a {
color: #667eea;
text-decoration: none;
}
.auth-links a:hover {
text-decoration: underline;
}
.logout-button {
background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.2);
color: white;
padding: 0.75rem 1rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
font-weight: 500;
width: 100%;
}
.logout-button:hover {
background: rgba(255,255,255,0.2);
transform: translateY(-1px);
}
/* Calendar View */
.calendar-view {
height: calc(100vh - 4rem); /* Full height minus main padding */
display: flex;
flex-direction: column;
}
.calendar-loading, .calendar-error {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
background: white;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.calendar-loading p {
font-size: 1.2rem;
color: #666;
}
.calendar-error p {
font-size: 1.2rem;
color: #d32f2f;
}
/* Calendar Component */
.calendar {
background: white;
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0,0,0,0.1);
overflow: hidden;
flex: 1;
display: flex;
flex-direction: column;
}
.calendar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem 2rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.month-year {
font-size: 1.8rem;
font-weight: 600;
margin: 0;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.header-left {
display: flex;
align-items: center;
gap: 8px;
}
.header-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
.time-increment-button {
background: rgba(255,255,255,0.2);
border: none;
color: white;
font-size: 14px;
font-weight: bold;
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.time-increment-button:hover {
background: rgba(255,255,255,0.3);
}
.nav-button {
background: rgba(255,255,255,0.2);
border: none;
color: white;
font-size: 1.5rem;
font-weight: bold;
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.nav-button:hover {
background: rgba(255,255,255,0.3);
}
.today-button {
background: rgba(255,255,255,0.2);
border: none;
color: white;
font-size: 0.9rem;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s;
}
.today-button:hover {
background: rgba(255,255,255,0.3);
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-rows: auto repeat(6, 1fr);
flex: 1;
background: white;
gap: 0;
}
/* Week View Container */
.week-view-container {
display: flex;
flex-direction: column;
height: 100%;
background: white;
}
/* Week Header */
.week-header {
display: grid;
grid-template-columns: 80px repeat(7, 1fr);
background: #f8f9fa;
border-bottom: 2px solid #e9ecef;
position: sticky;
top: 0;
z-index: 10;
}
.time-gutter {
background: #f8f9fa;
border-right: 1px solid #e9ecef;
}
.week-day-header {
padding: 1rem;
text-align: center;
border-right: 1px solid #e9ecef;
background: #f8f9fa;
}
.week-day-header.today {
background: #e3f2fd;
color: #1976d2;
}
.weekday-name {
font-size: 0.9rem;
font-weight: 600;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 0.25rem;
}
.week-day-header .day-number {
font-size: 1.5rem;
font-weight: 700;
}
.week-day-header.today .weekday-name {
color: #1976d2;
}
/* Week Content */
.week-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
.time-grid {
display: grid;
grid-template-columns: 80px 1fr;
min-height: 100%;
}
/* Time Labels */
.time-labels {
background: #f8f9fa;
border-right: 1px solid #e9ecef;
position: sticky;
left: 0;
z-index: 5;
}
.time-label {
height: 60px;
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 0.5rem;
font-size: 0.75rem;
color: #666;
border-bottom: 1px solid #f0f0f0;
font-weight: 500;
}
.time-label.final-boundary {
height: 60px; /* Keep same height but this marks the end boundary */
border-bottom: 2px solid #e9ecef; /* Stronger border to show day end */
color: #999; /* Lighter color to indicate it's the boundary */
font-size: 0.7rem;
}
/* Week Days Grid */
.week-days-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
}
.week-day-column {
position: relative;
border-right: 1px solid #e9ecef;
min-height: 1500px; /* 25 time labels × 60px = 1500px total */
}
.week-day-column:last-child {
border-right: none;
}
.week-day-column.today {
background: #fafffe;
}
/* Time Slots */
.time-slot {
height: 60px;
border-bottom: 1px solid #f0f0f0;
position: relative;
pointer-events: none; /* Don't capture mouse events */
}
.time-slot-half {
height: 30px;
border-bottom: 1px dotted #f5f5f5;
pointer-events: none; /* Don't capture mouse events */
}
.time-slot-half:last-child {
border-bottom: none;
}
.time-slot.boundary-slot {
height: 60px; /* Match the final time label height */
border-bottom: 2px solid #e9ecef; /* Strong border to match final boundary */
background: rgba(0,0,0,0.02); /* Slightly different background to indicate boundary */
pointer-events: none; /* Don't capture mouse events */
}
/* Events Container */
.events-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none; /* Container doesn't capture, but children (events) do */
}
/* Week Events */
.week-event {
position: absolute;
left: 4px;
right: 4px;
min-height: 20px;
background: #3B82F6;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-size: 0.75rem;
line-height: 1.3;
cursor: pointer;
pointer-events: auto;
z-index: 3;
border: 1px solid rgba(255,255,255,0.2);
text-shadow: 0 1px 1px rgba(0,0,0,0.3);
font-weight: 500;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.week-event:hover {
filter: brightness(1.1);
z-index: 4;
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.week-event.refreshing {
animation: pulse 1.5s ease-in-out infinite alternate;
border-color: #ff9800;
}
/* Temporary event box during drag creation */
.temp-event-box {
position: absolute;
left: 4px;
right: 4px;
background: rgba(59, 130, 246, 0.3);
border: 2px dashed rgba(59, 130, 246, 0.8);
border-radius: 4px;
color: rgba(59, 130, 246, 0.9);
font-size: 0.75rem;
font-weight: 600;
padding: 4px 6px;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
z-index: 6; /* Higher than events */
text-align: center;
user-select: none;
}
.week-event .event-title {
font-weight: 600;
margin-bottom: 2px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.week-event .event-time {
font-size: 0.65rem;
opacity: 0.9;
font-weight: 400;
}
.week-event.all-day {
opacity: 0.9;
border-left: 4px solid rgba(255,255,255,0.5);
font-style: italic;
background: linear-gradient(135deg, var(--event-color, #3B82F6), rgba(255,255,255,0.1)) !important;
}
/* Legacy Week Grid (for backward compatibility) */
.week-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-rows: auto 1fr;
flex: 1;
background: white;
}
.week-view .calendar-day {
height: 100%; /* Make week view days stretch to full height of their grid cell */
}
.weekday-header {
background: #f8f9fa;
padding: 1rem;
text-align: center;
font-weight: 600;
color: #666;
border-bottom: 1px solid #e9ecef;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.calendar-day {
border: 1px solid #f0f0f0;
padding: 0.75rem;
display: flex;
flex-direction: column;
cursor: pointer;
transition: background-color 0.2s;
position: relative;
overflow: hidden;
}
.calendar-day:hover {
background-color: #f8f9ff;
}
.calendar-day.current-month {
background: white;
}
.calendar-day.prev-month,
.calendar-day.next-month {
background: #fafafa;
color: #ccc;
}
.calendar-day.today {
background: #e3f2fd;
border: 2px solid #2196f3;
}
.calendar-day.has-events {
background: #fff3e0;
}
.calendar-day.today.has-events {
background: #e1f5fe;
}
.calendar-day.selected {
background: #e8f5e8;
border: 2px solid #4caf50;
box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}
.calendar-day.selected.has-events {
background: #f1f8e9;
}
.calendar-day.selected.today {
background: #e0f2f1;
border: 2px solid #4caf50;
}
.calendar-day.selected .day-number {
color: #2e7d32;
font-weight: 700;
}
.day-number {
font-weight: 600;
font-size: 1.1rem;
margin-bottom: 0.5rem;
}
.calendar-day.today .day-number {
color: #1976d2;
}
.day-events {
flex: 1;
display: flex;
flex-direction: column;
gap: 2px;
overflow: hidden;
}
.event-indicators {
flex: 1;
display: flex;
flex-direction: column;
gap: 2px;
}
.more-events-indicator {
font-size: 0.7rem;
color: #666;
font-weight: 500;
padding: 2px 4px;
text-align: center;
background: #f5f5f5;
border-radius: 3px;
cursor: pointer;
transition: background-color 0.2s;
}
.more-events-indicator:hover {
background: #e0e0e0;
}
.event-box {
/* Background color will be set inline via style attribute */
color: white;
padding: 2px 4px;
border-radius: 3px;
font-size: 0.7rem;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid rgba(255,255,255,0.2);
text-shadow: 0 1px 1px rgba(0,0,0,0.3);
font-weight: 500;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
position: relative;
}
.event-box:hover {
filter: brightness(1.15);
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.event-box.refreshing {
animation: pulse 1.5s ease-in-out infinite alternate;
border-color: #ff9800;
}
.event-box.refreshing::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 152, 0, 0.3);
pointer-events: none;
}
@keyframes pulse {
0% {
opacity: 0.7;
}
100% {
opacity: 1;
}
}
.event-dot {
background: #ff9800;
height: 6px;
border-radius: 3px;
margin-bottom: 1px;
}
.more-events {
font-size: 0.7rem;
color: #666;
margin-top: 2px;
font-weight: 500;
}
/* Event Modal Styles */
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(2px);
}
.modal-content {
background: white;
border-radius: 12px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
position: relative;
animation: modalAppear 0.2s ease-out;
}
@keyframes modalAppear {
from {
opacity: 0;
transform: scale(0.9) translateY(-20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.5rem 2rem 1rem;
border-bottom: 1px solid #e9ecef;
}
.modal-header h3 {
margin: 0;
color: #333;
font-size: 1.4rem;
font-weight: 600;
}
.modal-close {
background: none;
border: none;
font-size: 1.8rem;
color: #999;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
line-height: 1;
}
.modal-close:hover {
background: #f8f9fa;
color: #666;
transform: scale(1.1);
}
.modal-body {
padding: 1.5rem 2rem 2rem;
}
.event-detail {
display: grid;
grid-template-columns: 100px 1fr;
gap: 1rem;
margin-bottom: 1rem;
align-items: start;
}
.event-detail strong {
color: #555;
font-weight: 600;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.event-detail span {
color: #333;
font-size: 1rem;
line-height: 1.5;
word-break: break-word;
}
/* Responsive Design */
@media (max-width: 768px) {
.app-sidebar {
width: 100%;
height: auto;
min-height: unset;
position: relative;
flex-direction: row;
padding: 1rem;
}
.sidebar-header {
padding: 0;
border-bottom: none;
border-right: 1px solid rgba(255,255,255,0.2);
margin-right: 1rem;
}
.sidebar-header h1 {
font-size: 1.4rem;
text-align: left;
margin: 0;
}
.user-info {
display: none; /* Hide user info on mobile to save space */
}
.sidebar-nav {
flex-direction: row;
padding: 0;
align-items: center;
gap: 1rem;
flex: 1;
}
.sidebar-nav .nav-link {
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
}
.logout-button {
margin: 0;
padding: 0.5rem 0.75rem;
font-size: 0.9rem;
width: auto;
}
.calendar-list {
display: none; /* Hide calendar list on mobile */
}
.sidebar-footer {
padding: 0;
border-top: none;
}
.view-selector {
margin-bottom: 0.5rem;
}
.view-selector-dropdown {
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
}
.app-main {
margin-left: 0;
max-width: 100%;
width: 100%;
padding: 1rem;
}
.calendar-header {
padding: 1rem;
}
.month-year {
font-size: 1.4rem;
}
.nav-button {
width: 35px;
height: 35px;
font-size: 1.2rem;
}
.today-button {
font-size: 0.8rem;
padding: 0.4rem 0.8rem;
}
.weekday-header {
padding: 0.5rem;
font-size: 0.8rem;
}
.calendar-day {
min-height: 70px;
padding: 0.5rem;
}
.day-number {
font-size: 1rem;
}
.calendar-view {
height: calc(100vh - 8rem);
}
}
@media (max-width: 480px) {
.calendar-day {
min-height: 60px;
padding: 0.25rem;
}
.weekday-header {
padding: 0.5rem 0.25rem;
}
.day-number {
font-size: 0.9rem;
}
}
/* Mobile adjustments for modal */
@media (max-width: 768px) {
.modal-content {
margin: 1rem;
width: calc(100% - 2rem);
}
.modal-header, .modal-body {
padding: 1rem 1.5rem;
}
.event-detail {
grid-template-columns: 80px 1fr;
gap: 0.75rem;
margin-bottom: 0.75rem;
}
.event-detail strong {
font-size: 0.8rem;
}
.event-detail span {
font-size: 0.9rem;
}
.login-form, .register-form {
padding: 1.5rem;
}
}
/* Create Calendar Button */
.create-calendar-button {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 0.75rem 1rem;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
margin-bottom: 1rem;
font-size: 0.9rem;
font-weight: 500;
backdrop-filter: blur(10px);
width: 100%;
}
.create-calendar-button:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.5);
transform: translateY(-1px);
}
.create-calendar-button:active {
transform: translateY(0);
}
/* View Selector */
.view-selector {
margin-bottom: 1rem;
}
.view-selector-dropdown {
width: 100%;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: white;
padding: 0.75rem 1rem;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
backdrop-filter: blur(10px);
}
.view-selector-dropdown:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.3);
}
.view-selector-dropdown:focus {
outline: none;
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.4);
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}
.view-selector-dropdown option {
background: #2a2a2a;
color: white;
padding: 0.5rem;
}
/* Create Calendar Modal */
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 2rem;
}
.create-calendar-modal {
background: white;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
max-width: 500px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
from {
opacity: 0;
transform: scale(0.9) translateY(-20px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.create-calendar-modal .modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 2rem 2rem 1rem;
border-bottom: 1px solid #e9ecef;
}
.create-calendar-modal .modal-header h2 {
margin: 0;
color: #495057;
font-size: 1.5rem;
font-weight: 600;
}
.close-button {
background: none;
border: none;
font-size: 1.5rem;
color: #6c757d;
cursor: pointer;
padding: 0.25rem;
line-height: 1;
border-radius: 4px;
transition: all 0.2s ease;
}
.close-button:hover {
color: #495057;
background: #f8f9fa;
}
.create-calendar-modal .modal-body {
padding: 1.5rem 2rem 2rem;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: #495057;
font-weight: 500;
font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid #ced4da;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.form-group input:disabled,
.form-group textarea:disabled {
background-color: #f8f9fa;
color: #6c757d;
cursor: not-allowed;
}
.color-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.75rem;
margin: 0.75rem 0;
}
.color-option {
width: 40px;
height: 40px;
border: 3px solid transparent;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
.color-option:hover {
transform: scale(1.1);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.color-option.selected {
border-color: #495057;
transform: scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.color-option.selected::after {
content: '✓';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-weight: bold;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.color-help-text {
font-size: 0.8rem;
color: #6c757d;
margin-top: 0.5rem;
margin-bottom: 0;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 1rem;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid #e9ecef;
}
.cancel-button,
.create-button {
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
border: none;
}
.cancel-button {
background: #f8f9fa;
color: #6c757d;
border: 1px solid #ced4da;
}
.cancel-button:hover:not(:disabled) {
background: #e9ecef;
color: #495057;
}
.create-button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.create-button:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.cancel-button:disabled,
.create-button:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none !important;
}
.error-message {
background: #f8d7da;
color: #721c24;
padding: 0.75rem 1rem;
border: 1px solid #f5c6cb;
border-radius: 6px;
margin-bottom: 1rem;
font-size: 0.9rem;
}
/* Mobile adjustments for create calendar modal */
@media (max-width: 768px) {
.modal-backdrop {
padding: 1rem;
}
.create-calendar-modal {
max-height: 95vh;
}
.create-calendar-modal .modal-header,
.create-calendar-modal .modal-body {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.color-grid {
grid-template-columns: repeat(4, 1fr);
gap: 0.5rem;
}
.color-option {
width: 35px;
height: 35px;
}
.modal-actions {
flex-direction: column;
gap: 0.75rem;
}
.cancel-button,
.create-button {
width: 100%;
text-align: center;
}
}
/* Context Menu */
.context-menu {
background: white;
border: 1px solid #e9ecef;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
min-width: 160px;
overflow: hidden;
animation: contextMenuSlideIn 0.15s ease;
}
@keyframes contextMenuSlideIn {
from {
opacity: 0;
transform: scale(0.95) translateY(-5px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.context-menu-item {
display: flex;
align-items: center;
padding: 0.75rem 1rem;
color: #495057;
cursor: pointer;
transition: background-color 0.2s ease;
font-size: 0.9rem;
border: none;
background: none;
width: 100%;
text-align: left;
}
.context-menu-item:hover {
background-color: #f8f9fa;
}
.context-menu-delete {
color: #dc3545;
}
.context-menu-delete:hover {
background-color: #f8f9fa;
color: #dc3545;
}
.context-menu-icon {
margin-right: 0.5rem;
font-size: 1rem;
}
/* Prevent text selection on context menu items */
.context-menu-item {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
/* Event Creation Modal Styles */
.create-event-modal {
max-width: 600px;
width: 95%;
}
.create-event-modal .modal-body {
max-height: 60vh;
overflow-y: auto;
}
.create-event-modal .form-group {
margin-bottom: 1.5rem;
}
.create-event-modal .form-group label {
display: block;
margin-bottom: 0.5rem;
color: #495057;
font-weight: 500;
font-size: 0.9rem;
}
.create-event-modal .form-input {
width: 100%;
padding: 0.75rem;
border: 1px solid #ced4da;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
font-family: inherit;
box-sizing: border-box;
}
.create-event-modal .form-input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.create-event-modal .form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.create-event-modal .modal-footer {
display: flex;
justify-content: flex-end;
gap: 1rem;
padding: 1.5rem 2rem;
border-top: 1px solid #e9ecef;
background: #f8f9fa;
}
/* Button Styles */
.btn {
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
border: none;
text-align: center;
text-decoration: none;
display: inline-block;
line-height: 1.5;
user-select: none;
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none !important;
}
.btn-secondary {
background: #f8f9fa;
color: #6c757d;
border: 1px solid #ced4da;
}
.btn-secondary:hover:not(:disabled) {
background: #e9ecef;
color: #495057;
border-color: #adb5bd;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: 1px solid transparent;
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
/* Weekday selection styles */
.weekday-selection {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
margin-top: 0.5rem;
}
.weekday-checkbox {
display: flex;
align-items: center;
cursor: pointer;
padding: 0.5rem 0.75rem;
border: 1px solid #ced4da;
border-radius: 6px;
background: white;
transition: all 0.2s ease;
user-select: none;
min-width: 3rem;
justify-content: center;
}
.weekday-checkbox:hover {
border-color: #667eea;
background: #f8f9ff;
}
.weekday-checkbox input[type="checkbox"] {
display: none;
}
.weekday-checkbox input[type="checkbox"]:checked + .weekday-label {
color: white;
}
.weekday-checkbox:has(input[type="checkbox"]:checked) {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: #667eea;
color: white;
}
.weekday-label {
font-size: 0.85rem;
font-weight: 500;
color: #495057;
transition: color 0.2s ease;
}
/* Mobile adjustments for event creation modal */
@media (max-width: 768px) {
.create-event-modal .form-row {
grid-template-columns: 1fr;
gap: 1rem;
}
.create-event-modal .modal-footer {
flex-direction: column;
gap: 0.75rem;
padding: 1rem 1.5rem;
}
.create-event-modal .btn {
width: 100%;
}
.weekday-selection {
gap: 0.25rem;
}
.weekday-checkbox {
min-width: 2.5rem;
padding: 0.4rem 0.6rem;
}
}