From b0a8ef09a8335d1852c3b3c689983f08d19fb85e Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Fri, 5 Sep 2025 10:58:47 -0400 Subject: [PATCH] Major CSS cleanup and mobile detection system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CSS Improvements: - Remove all mobile responsive CSS (@media queries) - 348+ lines removed - Add comprehensive CSS variables for glass effects, control dimensions, transitions - Consolidate duplicate patterns (43+ transition, 37+ border-radius, 61+ padding instances) - Remove legacy week grid CSS section - Reduce total CSS from 4,197 to 3,828 lines (8.8% reduction) Sidebar Enhancements: - Remove unused sidebar-nav div and navigation link - Standardize all dropdown controls to consistent 40px height and styling - Reduce calendar item padding from 0.75rem to 0.5rem for more compact display - Unify theme-selector and style-selector styling with view-selector Mobile Detection: - Add MobileWarningModal component with device detection - Show helpful popup directing mobile users to native CalDAV apps - Add Navigator and DomTokenList web-sys features - Desktop-focused experience with appropriate mobile guidance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- frontend/Cargo.toml | 2 + frontend/src/app.rs | 21 +- .../src/components/mobile_warning_modal.rs | 96 +++ frontend/src/components/mod.rs | 2 + frontend/src/components/sidebar.rs | 3 - frontend/styles.css | 753 +++++------------- 6 files changed, 311 insertions(+), 566 deletions(-) create mode 100644 frontend/src/components/mobile_warning_modal.rs diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index 0540a9d..f957bc5 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -22,6 +22,8 @@ web-sys = { version = "0.3", features = [ "Document", "Window", "Location", + "Navigator", + "DomTokenList", "Headers", "Request", "RequestInit", diff --git a/frontend/src/app.rs b/frontend/src/app.rs index 3a0f561..4427519 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -1,8 +1,9 @@ use crate::components::{ CalendarContextMenu, ContextMenu, CreateCalendarModal, CreateEventModal, DeleteAction, - EditAction, EventContextMenu, EventModal, EventCreationData, ExternalCalendarModal, RouteHandler, - Sidebar, Theme, ViewMode, + EditAction, EventContextMenu, EventModal, EventCreationData, ExternalCalendarModal, + MobileWarningModal, RouteHandler, Sidebar, Theme, ViewMode, }; +use crate::components::mobile_warning_modal::is_mobile_device; use crate::components::sidebar::{Style}; use crate::models::ical::VEvent; use crate::services::{calendar_service::{UserInfo, ExternalCalendar}, CalendarService}; @@ -117,6 +118,9 @@ pub fn App() -> Html { // External calendar state let external_calendars = use_state(|| -> Vec { Vec::new() }); let external_calendar_events = use_state(|| -> Vec { Vec::new() }); + + // Mobile warning state + let mobile_warning_open = use_state(|| is_mobile_device()); let external_calendar_modal_open = use_state(|| false); let refresh_interval = use_state(|| -> Option { None }); @@ -274,6 +278,13 @@ pub fn App() -> Html { }) }; + let on_mobile_warning_close = { + let mobile_warning_open = mobile_warning_open.clone(); + Callback::from(move |_| { + mobile_warning_open.set(false); + }) + }; + let on_view_change = { let current_view = current_view.clone(); Callback::from(move |new_view: ViewMode| { @@ -1676,6 +1687,12 @@ pub fn App() -> Html { } })} /> + + // Mobile warning modal + } diff --git a/frontend/src/components/mobile_warning_modal.rs b/frontend/src/components/mobile_warning_modal.rs new file mode 100644 index 0000000..f87e45f --- /dev/null +++ b/frontend/src/components/mobile_warning_modal.rs @@ -0,0 +1,96 @@ +use yew::prelude::*; +use web_sys::window; +use wasm_bindgen::JsCast; + +#[derive(Properties, PartialEq)] +pub struct MobileWarningModalProps { + pub is_open: bool, + pub on_close: Callback<()>, +} + +#[function_component(MobileWarningModal)] +pub fn mobile_warning_modal(props: &MobileWarningModalProps) -> Html { + let on_backdrop_click = { + let on_close = props.on_close.clone(); + Callback::from(move |e: MouseEvent| { + if let Some(target) = e.target() { + let element = target.dyn_into::().unwrap(); + if element.class_list().contains("modal-overlay") { + on_close.emit(()); + } + } + }) + }; + + if !props.is_open { + return html! {}; + } + + html! { + + } +} + +// Helper function to detect mobile devices +pub fn is_mobile_device() -> bool { + if let Some(window) = window() { + let navigator = window.navigator(); + let user_agent = navigator.user_agent().unwrap_or_default(); + let user_agent = user_agent.to_lowercase(); + + // Check for mobile device indicators + user_agent.contains("mobile") + || user_agent.contains("android") + || user_agent.contains("iphone") + || user_agent.contains("ipad") + || user_agent.contains("ipod") + || user_agent.contains("blackberry") + || user_agent.contains("webos") + || user_agent.contains("opera mini") + || user_agent.contains("windows phone") + } else { + false + } +} \ No newline at end of file diff --git a/frontend/src/components/mod.rs b/frontend/src/components/mod.rs index a0624bf..54d5a9d 100644 --- a/frontend/src/components/mod.rs +++ b/frontend/src/components/mod.rs @@ -10,6 +10,7 @@ pub mod event_form; pub mod event_modal; pub mod external_calendar_modal; pub mod login; +pub mod mobile_warning_modal; pub mod month_view; pub mod recurring_edit_modal; pub mod route_handler; @@ -29,6 +30,7 @@ pub use event_context_menu::{DeleteAction, EditAction, EventContextMenu}; pub use event_modal::EventModal; pub use external_calendar_modal::ExternalCalendarModal; pub use login::Login; +pub use mobile_warning_modal::MobileWarningModal; pub use month_view::MonthView; pub use recurring_edit_modal::{RecurringEditAction, RecurringEditModal}; pub use route_handler::RouteHandler; diff --git a/frontend/src/components/sidebar.rs b/frontend/src/components/sidebar.rs index 3ab9b9d..36e33fc 100644 --- a/frontend/src/components/sidebar.rs +++ b/frontend/src/components/sidebar.rs @@ -204,9 +204,6 @@ pub fn sidebar(props: &SidebarProps) -> Html { } } - { if let Some(ref info) = props.user_info { if !info.calendars.is_empty() { diff --git a/frontend/styles.css b/frontend/styles.css index 43bfb3c..9518570 100644 --- a/frontend/styles.css +++ b/frontend/styles.css @@ -23,6 +23,22 @@ --transition-fast: 0.15s ease; --transition-normal: 0.2s ease; --transition-slow: 0.3s ease; + + /* Common Glass/Glassmorphism Effects */ + --glass-bg: var(--glass-bg); + --glass-bg-light: var(--glass-bg-light); + --glass-bg-lighter: var(--glass-bg-lighter); + --glass-border: 1px solid var(--glass-bg-light); + --glass-border-light: 1px solid var(--glass-bg-lighter); + + /* Standard Control Dimensions */ + --control-height: 40px; + --control-padding: var(--control-padding); + --control-padding-sm: 0.5rem; + --control-margin: 1rem; + + /* Common Transition */ + --standard-transition: var(--standard-transition); } body { @@ -187,33 +203,6 @@ body { 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; @@ -276,7 +265,7 @@ body { top: 100%; left: 0; background: white; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 1000; @@ -357,7 +346,7 @@ body { .login-form, .register-form { background: white; padding: 2rem; - border-radius: 8px; + border-radius: var(--border-radius-medium); box-shadow: 0 4px 6px rgba(0,0,0,0.1); width: 100%; max-width: 400px; @@ -382,7 +371,7 @@ body { .form-group input { width: 100%; - padding: 0.75rem; + padding: var(--control-padding); border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; @@ -426,7 +415,7 @@ body { .login-button, .register-button { width: 100%; - padding: 0.75rem; + padding: var(--control-padding); background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; @@ -451,7 +440,7 @@ body { .error-message { background-color: #f8d7da; color: #721c24; - padding: 0.75rem; + padding: var(--control-padding); border-radius: 4px; margin-bottom: 1rem; border: 1px solid #f5c6cb; @@ -476,8 +465,8 @@ body { 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; + padding: var(--control-padding) 1rem; + border-radius: var(--border-radius-medium); cursor: pointer; transition: all 0.2s; font-weight: 500; @@ -1014,7 +1003,7 @@ body { } .week-event:hover .resize-handle { - background: rgba(255, 255, 255, 0.3); + background: var(--glass-bg-lighter); } .week-event:hover .resize-handle-top { @@ -1122,19 +1111,74 @@ body { box-shadow: 0 2px 8px rgba(107, 114, 128, 0.4); } -/* Legacy Week Grid (for backward compatibility) */ -.week-grid { - display: grid; - grid-template-columns: repeat(7, 1fr); - grid-template-rows: auto 1fr; - flex: 1; - background: var(--calendar-bg, white); + z-index: 1000; } -.week-view .calendar-day { - height: 100%; /* Make week view days stretch to full height of their grid cell */ + max-width: 500px; + width: 90%; } + font-size: 3rem; + text-align: center; + margin-bottom: 1rem; +} + + font-size: 1.25rem; + font-weight: 600; + text-align: center; + margin-bottom: 1rem; + color: #1f2937; +} + + font-size: 1rem; + text-align: center; + margin-bottom: 1.5rem; + color: #4b5563; + line-height: 1.5; +} + + list-style: none; + padding: 0; + margin: 0 0 1.5rem 0; + background: #f9fafb; + border-radius: var(--border-radius-medium); + padding: 1rem; +} + + margin-bottom: 0.75rem; + font-size: 0.95rem; + color: #374151; + line-height: 1.4; +} + + margin-bottom: 0; +} + + font-size: 0.9rem; + text-align: center; + color: #6b7280; + font-style: italic; + margin-bottom: 1.5rem; +} + +.continue-anyway-button { + background: var(--primary-color, #667eea); + color: white; + border: none; + padding: var(--control-padding) 1.5rem; + border-radius: var(--border-radius-medium); + font-size: 1rem; + font-weight: 500; + cursor: pointer; + width: 100%; + transition: background-color 0.2s ease; +} + +.continue-anyway-button:hover { + background: var(--primary-color, #5a6fd8); +} + + .weekday-header { background: #f8f9fa; padding: 1rem; @@ -1149,7 +1193,7 @@ body { .calendar-day { border: 1px solid var(--calendar-border, #f0f0f0); - padding: 0.75rem; + padding: var(--control-padding); display: flex; flex-direction: column; cursor: pointer; @@ -1258,7 +1302,7 @@ body { text-overflow: ellipsis; white-space: nowrap; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); border: 1px solid rgba(255,255,255,0.2); text-shadow: 0 1px 1px rgba(0,0,0,0.3); font-weight: 500; @@ -1414,171 +1458,18 @@ body { 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: 1.5rem 2rem; - } - - .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); + background: var(--glass-bg-light); + border: 1px solid var(--glass-bg-lighter); color: white; - padding: 0.75rem 1rem; - border-radius: 8px; + padding: var(--control-padding) 1rem; + border-radius: var(--border-radius-medium); cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); margin-bottom: 1rem; font-size: 0.9rem; font-weight: 500; @@ -1587,7 +1478,7 @@ body { } .create-calendar-button:hover { - background: rgba(255, 255, 255, 0.3); + background: var(--glass-bg-lighter); border-color: rgba(255, 255, 255, 0.5); transform: translateY(-1px); } @@ -1603,28 +1494,28 @@ body { .view-selector-dropdown { width: 100%; - background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.2); + background: var(--glass-bg); + border: 1px solid var(--glass-bg-light); color: white; - padding: 0.75rem 1rem; - border-radius: 8px; + padding: var(--control-padding) 1rem; + border-radius: var(--border-radius-medium); font-size: 0.9rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); backdrop-filter: blur(10px); } .view-selector-dropdown:hover { - background: rgba(255, 255, 255, 0.2); - border-color: rgba(255, 255, 255, 0.3); + background: var(--glass-bg-light); + border-color: var(--glass-bg-lighter); } .view-selector-dropdown:focus { outline: none; - background: rgba(255, 255, 255, 0.2); + background: var(--glass-bg-light); border-color: rgba(255, 255, 255, 0.4); - box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1); + box-shadow: 0 0 0 2px var(--glass-bg); } .view-selector-dropdown option { @@ -1695,7 +1586,7 @@ body { padding: 0.25rem; line-height: 1; border-radius: 4px; - transition: all 0.2s ease; + transition: var(--standard-transition); } .close-button:hover { @@ -1722,9 +1613,9 @@ body { .form-group input, .form-group textarea { width: 100%; - padding: 0.75rem; + padding: var(--control-padding); border: 1px solid #ced4da; - border-radius: 8px; + border-radius: var(--border-radius-medium); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; font-family: inherit; @@ -1755,9 +1646,9 @@ body { width: 40px; height: 40px; border: 3px solid transparent; - border-radius: 8px; + border-radius: var(--border-radius-medium); cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); position: relative; } @@ -1801,12 +1692,12 @@ body { .cancel-button, .create-button { - padding: 0.75rem 1.5rem; - border-radius: 8px; + padding: var(--control-padding) 1.5rem; + border-radius: var(--border-radius-medium); font-size: 1rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); border: none; } @@ -1841,56 +1732,19 @@ body { .error-message { background: #f8d7da; color: #721c24; - padding: 0.75rem 1rem; + padding: var(--control-padding) 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; + border-radius: var(--border-radius-medium); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); min-width: 160px; overflow: hidden; @@ -1911,7 +1765,7 @@ body { .context-menu-item { display: flex; align-items: center; - padding: 0.75rem 1rem; + padding: var(--control-padding) 1rem; color: #495057; cursor: pointer; transition: background-color 0.2s ease; @@ -1974,9 +1828,9 @@ body { .create-event-modal .form-input { width: 100%; - padding: 0.75rem; + padding: var(--control-padding); border: 1px solid #ced4da; - border-radius: 8px; + border-radius: var(--border-radius-medium); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; font-family: inherit; @@ -2014,12 +1868,12 @@ body { /* Button Styles */ .btn { - padding: 0.75rem 1.5rem; - border-radius: 8px; + padding: var(--control-padding) 1.5rem; + border-radius: var(--border-radius-medium); font-size: 1rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); border: none; text-align: center; text-decoration: none; @@ -2073,7 +1927,7 @@ body { border: 1px solid #ced4da; border-radius: 6px; background: white; - transition: all 0.2s ease; + transition: var(--standard-transition); user-select: none; min-width: 3rem; justify-content: center; @@ -2105,32 +1959,6 @@ body { 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; - } -} /* Recurring Edit Modal */ .recurring-edit-modal { @@ -2151,9 +1979,9 @@ body { color: #495057; padding: 1rem; text-align: left; - border-radius: 8px; + border-radius: var(--border-radius-medium); cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .recurring-option:hover { @@ -2177,25 +2005,6 @@ body { line-height: 1.4; } -/* Mobile adjustments for recurring edit modal */ -@media (max-width: 768px) { - .recurring-edit-modal { - margin: 1rem; - width: calc(100% - 2rem); - } - - .recurring-option { - padding: 0.75rem; - } - - .recurring-option .option-title { - font-size: 0.9rem; - } - - .recurring-option .option-description { - font-size: 0.8rem; - } -} /* Tabbed Modal Interface Styles */ .tab-navigation { @@ -2215,12 +2024,12 @@ body { .tab-button { background: none; border: none; - padding: 0.75rem 1rem; + padding: var(--control-padding) 1rem; cursor: pointer; font-size: 0.85rem; font-weight: 500; color: #6c757d; - transition: all 0.2s ease; + transition: var(--standard-transition); border-bottom: 3px solid transparent; white-space: nowrap; display: flex; @@ -2262,27 +2071,6 @@ body { } } -/* Mobile adjustments for tabbed interface */ -@media (max-width: 768px) { - .tab-navigation { - gap: 0; - margin-bottom: 1rem; - } - - .tab-button { - padding: 0.5rem 0.75rem; - font-size: 0.8rem; - flex: 1; - justify-content: center; - min-width: unset; - } - - .tab-content { - min-height: 250px; - max-height: 45vh; - padding: 1rem 1.5rem 1.5rem 1.5rem; - } -} /* Form Help Text and Advanced Info Styles */ .form-help-text { @@ -2297,7 +2085,7 @@ body { .advanced-info { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1.5rem; } @@ -2353,7 +2141,7 @@ body { .people-info { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1.5rem; } @@ -2383,7 +2171,7 @@ body { .attendee-roles-preview { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -2458,23 +2246,12 @@ body { color: #b0b0b0; } -/* Mobile adjustments for people tab */ -@media (max-width: 768px) { - .role-item { - flex-direction: column; - gap: 0.25rem; - } - - .role-item strong { - min-width: unset; - } -} /* Categories Tab Styles */ .categories-suggestions { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1.5rem; } @@ -2504,7 +2281,7 @@ body { font-size: 0.8rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .category-tag:hover { @@ -2517,7 +2294,7 @@ body { .categories-info { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -2578,7 +2355,7 @@ body { .quick-actions { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -2607,7 +2384,7 @@ body { font-size: 0.85rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .action-btn:hover { @@ -2660,36 +2437,12 @@ body { border-color: #444444; } -/* Mobile adjustments for categories tab */ -@media (max-width: 768px) { - .category-tags { - gap: 0.25rem; - } - - .category-tag { - padding: 0.3rem 0.6rem; - font-size: 0.75rem; - } - - .feature-item { - flex-direction: column; - gap: 0.25rem; - } - - .feature-item strong { - min-width: unset; - } - - .action-buttons { - flex-direction: column; - } -} /* Location Tab Styles */ .location-suggestions { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1.5rem; } @@ -2719,7 +2472,7 @@ body { font-size: 0.8rem; font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .location-tag:hover { @@ -2732,7 +2485,7 @@ body { .location-info { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -2793,7 +2546,7 @@ body { .location-types { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -2815,7 +2568,7 @@ body { } .type-category { - padding: 0.75rem; + padding: var(--control-padding); background: white; border-radius: 6px; border: 1px solid #e9ecef; @@ -2907,44 +2660,12 @@ body { border-color: #444444; } -/* Mobile adjustments for location tab */ -@media (max-width: 768px) { - .location-tags { - gap: 0.25rem; - } - - .location-tag { - padding: 0.3rem 0.6rem; - font-size: 0.75rem; - } - - .geo-item { - flex-direction: column; - gap: 0.25rem; - } - - .geo-item strong { - min-width: unset; - } - - .type-examples { - gap: 0.75rem; - } - - .type-category { - padding: 0.5rem; - } - - .type-category li { - font-size: 0.8rem; - } -} /* Reminders & Attachments Tab Styles */ .reminder-types { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1.5rem; } @@ -2966,7 +2687,7 @@ body { } .alarm-type { - padding: 0.75rem; + padding: var(--control-padding); background: white; border-radius: 6px; border: 1px solid #e9ecef; @@ -2991,7 +2712,7 @@ body { .reminder-info { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -3052,7 +2773,7 @@ body { .reminder-patterns { background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1rem; margin-top: 1rem; } @@ -3112,7 +2833,7 @@ body { .completion-status { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; - border-radius: 8px; + border-radius: var(--border-radius-medium); padding: 1.5rem; margin-top: 2rem; text-align: center; @@ -3133,7 +2854,7 @@ body { } .feature-summary { - background: rgba(255, 255, 255, 0.1); + background: var(--glass-bg); border-radius: 6px; padding: 1rem; margin-top: 1rem; @@ -3144,7 +2865,7 @@ body { justify-content: space-between; align-items: center; padding: 0.5rem 0; - border-bottom: 1px solid rgba(255, 255, 255, 0.1); + border-bottom: 1px solid var(--glass-bg); } .summary-row:last-child { @@ -3201,48 +2922,6 @@ body { border-color: #444444; } -/* Mobile adjustments for reminders tab */ -@media (max-width: 768px) { - .alarm-examples { - grid-template-columns: 1fr; - gap: 0.5rem; - } - - .alarm-type { - padding: 0.5rem; - } - - .attachment-type, - .pattern-item { - flex-direction: column; - gap: 0.25rem; - align-items: flex-start; - } - - .attachment-type strong, - .pattern-item strong { - min-width: unset; - } - - .summary-row { - flex-direction: column; - align-items: flex-start; - gap: 0.25rem; - } - - .tab-desc { - text-align: left; - max-width: 100%; - } - - .completion-status { - padding: 1rem; - } - - .completion-status h5 { - font-size: 1rem; - } -} /* Theme Selector Styles */ .theme-selector { @@ -3251,24 +2930,25 @@ body { .theme-selector-dropdown { width: 100%; - padding: 0.5rem; - background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.2); - border-radius: 6px; + padding: var(--control-padding) 1rem; + background: var(--glass-bg); + border: 1px solid var(--glass-bg-light); + border-radius: var(--border-radius-medium); color: white; - font-size: 0.85rem; + font-size: 0.9rem; + font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .theme-selector-dropdown:hover { background: rgba(255, 255, 255, 0.15); - border-color: rgba(255, 255, 255, 0.3); + border-color: var(--glass-bg-lighter); } .theme-selector-dropdown:focus { outline: none; - background: rgba(255, 255, 255, 0.2); + background: var(--glass-bg-light); border-color: rgba(255, 255, 255, 0.4); } @@ -3295,24 +2975,25 @@ body { .style-selector-dropdown { width: 100%; - padding: 0.5rem; - background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.2); - border-radius: 6px; + padding: var(--control-padding) 1rem; + background: var(--glass-bg); + border: 1px solid var(--glass-bg-light); + border-radius: var(--border-radius-medium); color: white; - font-size: 0.85rem; + font-size: 0.9rem; + font-weight: 500; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .style-selector-dropdown:hover { background: rgba(255, 255, 255, 0.15); - border-color: rgba(255, 255, 255, 0.3); + border-color: var(--glass-bg-lighter); } .style-selector-dropdown:focus { outline: none; - background: rgba(255, 255, 255, 0.2); + background: var(--glass-bg-light); border-color: rgba(255, 255, 255, 0.4); } @@ -3674,7 +3355,7 @@ body { padding: 1rem; background: #f8f9fa; border: 1px solid #e9ecef; - border-radius: 8px; + border-radius: var(--border-radius-medium); } .interval-input { @@ -3768,7 +3449,7 @@ body { border: 1px solid #e9ecef; border-radius: 4px; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); } .month-checkbox:hover { @@ -3793,28 +3474,6 @@ body { margin-right: 0.25rem !important; } -/* Mobile responsive adjustments */ -@media (max-width: 768px) { - .end-options { - gap: 0.5rem; - } - - .end-option { - flex-direction: column; - align-items: flex-start; - gap: 0.25rem; - } - - .monthly-option { - flex-direction: column; - align-items: flex-start; - gap: 0.25rem; - } - - .yearly-months { - grid-template-columns: repeat(2, 1fr); - } -} /* ==================== EXTERNAL CALENDARS STYLES ==================== */ @@ -3847,17 +3506,17 @@ body { display: flex; align-items: center; gap: 0.75rem; - padding: 0.75rem; - border-radius: 8px; - transition: all 0.2s ease; + padding: var(--control-padding-sm); + border-radius: var(--border-radius-medium); + transition: var(--standard-transition); cursor: pointer; background: rgba(255, 255, 255, 0.05); - border: 1px solid rgba(255, 255, 255, 0.1); + border: 1px solid var(--glass-bg); } .external-calendar-info:hover { - background: rgba(255, 255, 255, 0.1); - border-color: rgba(255, 255, 255, 0.2); + background: var(--glass-bg); + border-color: var(--glass-bg-light); transform: translateX(2px); } @@ -3872,7 +3531,7 @@ body { width: 12px; height: 12px; border-radius: 50%; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid var(--glass-bg-lighter); flex-shrink: 0; } @@ -3907,13 +3566,13 @@ body { font-size: 0.8rem; padding: 2px 4px; border-radius: 3px; - transition: all 0.2s ease; + transition: var(--standard-transition); line-height: 1; } .external-calendar-refresh-btn:hover { color: rgba(255, 255, 255, 0.9); - background: rgba(255, 255, 255, 0.1); + background: var(--glass-bg); transform: rotate(180deg); } @@ -3928,14 +3587,14 @@ body { display: flex; align-items: center; gap: 0.75rem; - padding: 0.75rem; - border-radius: 8px; - transition: all 0.2s ease; + padding: var(--control-padding-sm); + border-radius: var(--border-radius-medium); + transition: var(--standard-transition); cursor: pointer; } .calendar-info:hover { - background: rgba(255, 255, 255, 0.1); + background: var(--glass-bg); transform: translateX(2px); } @@ -3951,10 +3610,10 @@ body { background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.9); - padding: 0.75rem 1rem; - border-radius: 8px; + padding: var(--control-padding) 1rem; + border-radius: var(--border-radius-medium); cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); margin-bottom: 1rem; font-size: 0.85rem; font-weight: 500; @@ -4034,7 +3693,7 @@ body { display: flex; align-items: center; justify-content: center; - transition: all 0.2s ease; + transition: var(--standard-transition); } .external-calendar-modal .modal-close:hover { @@ -4061,11 +3720,11 @@ body { .external-calendar-modal .form-group input[type="text"], .external-calendar-modal .form-group input[type="url"] { width: 100%; - padding: 0.75rem; + padding: var(--control-padding); border: 1px solid #ced4da; - border-radius: 8px; + border-radius: var(--border-radius-medium); font-size: 0.9rem; - transition: all 0.2s ease; + transition: var(--standard-transition); background: white; } @@ -4081,7 +3740,7 @@ body { height: 40px; padding: 0; border: 1px solid #ced4da; - border-radius: 8px; + border-radius: var(--border-radius-medium); cursor: pointer; background: none; } @@ -4105,12 +3764,12 @@ body { } .external-calendar-modal .btn { - padding: 0.75rem 1.5rem; - border-radius: 8px; + padding: var(--control-padding) 1.5rem; + border-radius: var(--border-radius-medium); font-size: 0.9rem; font-weight: 600; cursor: pointer; - transition: all 0.2s ease; + transition: var(--standard-transition); border: none; min-width: 100px; } @@ -4143,8 +3802,8 @@ body { .external-calendar-modal .error-message { background: #f8d7da; color: #721c24; - padding: 0.75rem 1rem; - border-radius: 8px; + padding: var(--control-padding) 1rem; + border-radius: var(--border-radius-medium); margin-bottom: 1rem; font-size: 0.9rem; border: 1px solid #f5c6cb; @@ -4167,31 +3826,3 @@ body { z-index: 1; } -/* Mobile Responsive */ -@media (max-width: 768px) { - .external-calendar-modal { - max-height: 95vh; - margin: 1rem; - width: calc(100% - 2rem); - } - - .external-calendar-modal .modal-header, - .external-calendar-modal .modal-body, - .external-calendar-modal .modal-actions { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - .external-calendar-info { - padding: 0.5rem; - } - - .external-calendar-name { - font-size: 0.8rem; - } - - .create-external-calendar-button { - font-size: 0.8rem; - padding: 0.5rem 1rem 0.5rem 2rem; - } -}