806 lines
17 KiB
CSS
806 lines
17 KiB
CSS
/* Responsive Design and Media Queries */
|
|
/* Mobile, tablet, and desktop layout adaptations */
|
|
|
|
/* Mobile Status Container */
|
|
@media (max-width: 768px) {
|
|
.status-container {
|
|
left: 10px;
|
|
right: 10px;
|
|
top: 10px;
|
|
width: auto;
|
|
max-width: 100%;
|
|
transform: none;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.status-message {
|
|
width: auto;
|
|
max-width: 90vw;
|
|
box-sizing: border-box;
|
|
font-size: var(--font-size-sm);
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
/* Very Small Screens (under 480px) */
|
|
@media (max-width: 480px) {
|
|
.status-container {
|
|
top: 70px;
|
|
max-width: calc(100vw - 20px);
|
|
min-width: 260px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 360px) {
|
|
.status-container {
|
|
top: 65px;
|
|
max-width: calc(100vw - 15px);
|
|
min-width: auto;
|
|
}
|
|
|
|
.status-message {
|
|
padding: 10px 12px;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
}
|
|
|
|
/* Mobile Layout Adaptations */
|
|
@media (max-width: 768px) {
|
|
/* Show mobile menu toggle */
|
|
.mobile-menu-toggle {
|
|
display: flex !important;
|
|
}
|
|
|
|
/* Sidebar as overlay */
|
|
.admin-sidebar {
|
|
position: fixed !important;
|
|
top: var(--header-height, 60px);
|
|
left: -300px; /* Changed from -100% to fixed value that's larger than width */
|
|
width: 280px !important;
|
|
max-width: 80vw !important;
|
|
min-width: 250px !important;
|
|
height: calc(100vh - var(--header-height, 60px));
|
|
height: calc(var(--app-height, 100vh) - var(--header-height, 60px));
|
|
z-index: 10000;
|
|
transition: left 0.3s ease;
|
|
box-shadow: 2px 0 10px rgba(0,0,0,0.1);
|
|
overflow-y: auto;
|
|
transform: translateX(0); /* Ensure no transform issues */
|
|
}
|
|
|
|
.admin-sidebar.active {
|
|
left: 0 !important;
|
|
transform: translateX(0); /* Ensure it's fully visible */
|
|
}
|
|
|
|
/* Show mobile sidebar elements */
|
|
.sidebar-header {
|
|
display: flex !important;
|
|
}
|
|
|
|
.sidebar-footer {
|
|
display: block !important;
|
|
}
|
|
|
|
/* Prevent body scroll when sidebar is open */
|
|
body.sidebar-open {
|
|
overflow: hidden;
|
|
position: fixed;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Admin content takes full width */
|
|
.admin-content {
|
|
width: 100%;
|
|
margin-left: 0;
|
|
}
|
|
|
|
/* Header adjustments */
|
|
.header {
|
|
padding: 10px 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.header h1 {
|
|
flex: 1;
|
|
text-align: center;
|
|
margin: 0;
|
|
font-size: var(--font-size-xl);
|
|
}
|
|
|
|
/* Hide desktop elements */
|
|
.desktop-only {
|
|
display: none !important;
|
|
}
|
|
|
|
.mobile-only {
|
|
display: flex;
|
|
}
|
|
|
|
/* Admin container becomes full width */
|
|
.admin-container {
|
|
flex-direction: column;
|
|
height: calc(100vh - 50px);
|
|
height: calc(var(--app-height) - 50px);
|
|
}
|
|
|
|
/* Remove duplicate sidebar styles - keep only the first one above */
|
|
/* DELETE or comment out this duplicate block: */
|
|
/*
|
|
.admin-sidebar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: -280px;
|
|
width: var(--sidebar-width-mobile);
|
|
height: 100vh;
|
|
height: var(--app-height);
|
|
background: white;
|
|
z-index: var(--z-modal-backdrop);
|
|
transition: left 0.3s ease;
|
|
box-shadow: var(--shadow-md);
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.admin-sidebar.active {
|
|
left: 0;
|
|
}
|
|
*/
|
|
|
|
/* Show sidebar header and footer on mobile */
|
|
.sidebar-header {
|
|
display: flex;
|
|
}
|
|
|
|
.sidebar-footer {
|
|
display: block;
|
|
}
|
|
|
|
/* Admin nav mobile styling */
|
|
.admin-nav {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
margin: var(--padding-base) 0;
|
|
}
|
|
|
|
.admin-nav a {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 10px 12px;
|
|
font-size: var(--font-size-base);
|
|
border-radius: var(--border-radius);
|
|
background-color: #f5f5f5;
|
|
border: 1px solid #e0e0e0;
|
|
transition: var(--transition);
|
|
}
|
|
|
|
.admin-nav a:active {
|
|
background-color: #e0e0e0;
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
.admin-nav a.active {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.admin-nav a:hover {
|
|
background-color: #ebebeb;
|
|
border-color: #d0d0d0;
|
|
}
|
|
|
|
.admin-nav a.active:hover {
|
|
background-color: #0056b3;
|
|
border-color: #0056b3;
|
|
}
|
|
|
|
/* Navigation icons and text */
|
|
.nav-icon {
|
|
font-size: var(--font-size-lg);
|
|
margin-right: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-text {
|
|
font-size: var(--font-size-base);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* Content adjustments */
|
|
.admin-content {
|
|
padding: 15px;
|
|
}
|
|
|
|
.admin-section {
|
|
padding: 15px;
|
|
}
|
|
|
|
.header .header-actions {
|
|
display: flex !important;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.header .header-actions .btn {
|
|
padding: 6px 10px;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.admin-info {
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
.admin-map-container {
|
|
grid-template-columns: 1fr;
|
|
gap: 15px;
|
|
}
|
|
|
|
.admin-map {
|
|
height: 250px;
|
|
}
|
|
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
/* User management mobile */
|
|
.users-admin-container {
|
|
grid-template-columns: 1fr;
|
|
gap: 25px;
|
|
}
|
|
|
|
.user-form,
|
|
.users-list {
|
|
padding: 25px;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.users-list {
|
|
overflow-x: auto;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* Data Convert responsive styles */
|
|
.field-mapping-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.csv-example {
|
|
font-size: 10px;
|
|
padding: 10px;
|
|
}
|
|
|
|
.csv-requirements {
|
|
padding: 15px;
|
|
}
|
|
|
|
/* NocoDB cards responsive */
|
|
.nocodb-cards {
|
|
grid-template-columns: 1fr;
|
|
gap: 16px;
|
|
}
|
|
|
|
.nocodb-card {
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.nocodb-card-header h3 {
|
|
font-size: var(--font-size-lg);
|
|
}
|
|
|
|
.info-box {
|
|
padding: 16px;
|
|
}
|
|
|
|
/* Shifts admin mobile */
|
|
.shifts-admin-container {
|
|
grid-template-columns: 1fr;
|
|
gap: var(--padding-base);
|
|
}
|
|
|
|
.shift-admin-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.shift-actions {
|
|
width: 100%;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* Volunteer names mobile styling */
|
|
.volunteer-count {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
}
|
|
|
|
.volunteer-names {
|
|
font-size: 0.8em;
|
|
line-height: 1.2;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Walk sheet container mobile */
|
|
.walk-sheet-container {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
gap: var(--padding-base);
|
|
}
|
|
|
|
.walk-sheet-config {
|
|
order: 1 !important;
|
|
margin-bottom: var(--padding-base);
|
|
}
|
|
|
|
/* Walk sheet mobile */
|
|
.walk-sheet-preview {
|
|
min-width: 0;
|
|
max-width: 100%;
|
|
width: 100%;
|
|
min-height: 500px;
|
|
padding: 10px;
|
|
overflow: hidden;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.walk-sheet-preview #walk-sheet-preview-content {
|
|
transform: scale(0.35);
|
|
transform-origin: top center;
|
|
margin: 0 auto;
|
|
width: 816px;
|
|
max-width: none;
|
|
margin-bottom: -600px;
|
|
position: relative;
|
|
left: 50%;
|
|
margin-left: -408px;
|
|
}
|
|
|
|
/* Users table mobile card layout */
|
|
.users-table {
|
|
font-size: var(--font-size-base);
|
|
min-width: auto;
|
|
width: 100%;
|
|
table-layout: auto;
|
|
border-collapse: collapse;
|
|
display: block;
|
|
}
|
|
|
|
.users-table thead {
|
|
display: none;
|
|
}
|
|
|
|
.users-table tbody,
|
|
.users-table tr,
|
|
.users-table td {
|
|
display: block;
|
|
width: 100% !important;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.users-table tr {
|
|
margin-bottom: 15px;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: var(--border-radius);
|
|
padding: 10px;
|
|
}
|
|
|
|
.users-table td {
|
|
padding: 8px 0;
|
|
border: none;
|
|
display: flex;
|
|
align-items: center;
|
|
word-wrap: break-word;
|
|
overflow-wrap: break-word;
|
|
}
|
|
|
|
.users-table td::before {
|
|
content: attr(data-label);
|
|
font-weight: bold;
|
|
width: 80px;
|
|
min-width: 80px;
|
|
margin-right: 10px;
|
|
color: #555;
|
|
}
|
|
|
|
.user-actions {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
width: 100%;
|
|
}
|
|
|
|
.user-communication-actions {
|
|
justify-content: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.user-communication-actions .btn {
|
|
min-width: 40px;
|
|
padding: 8px 12px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.user-admin-actions {
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.user-admin-actions .btn {
|
|
font-size: var(--font-size-xs);
|
|
padding: 8px 10px;
|
|
width: 100%;
|
|
text-align: center;
|
|
min-height: 36px;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.user-form .form-actions {
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Modal responsive */
|
|
.modal-content {
|
|
width: 95%;
|
|
max-height: 90vh;
|
|
}
|
|
|
|
.modal-body {
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.form-row {
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.volunteer-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.volunteer-actions {
|
|
align-self: flex-end;
|
|
gap: 6px;
|
|
}
|
|
|
|
.volunteer-communication-actions {
|
|
justify-content: center;
|
|
gap: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.volunteer-communication-actions .btn {
|
|
min-width: 40px;
|
|
padding: 8px 12px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.volunteer-admin-actions {
|
|
flex-direction: column;
|
|
gap: 6px;
|
|
}
|
|
|
|
.processing-actions {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
/* Very Small Screens (under 480px) */
|
|
@media (max-width: 480px) {
|
|
.admin-sidebar {
|
|
width: 260px !important; /* Added !important to override */
|
|
left: -280px !important; /* Increased to ensure complete hiding */
|
|
padding: 12px;
|
|
}
|
|
|
|
.admin-sidebar.active {
|
|
left: 0 !important;
|
|
}
|
|
|
|
.admin-nav {
|
|
gap: 6px;
|
|
margin: 15px 0;
|
|
}
|
|
|
|
.admin-nav a {
|
|
padding: 8px 10px;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.nav-icon {
|
|
font-size: var(--font-size-base);
|
|
margin-right: 6px;
|
|
}
|
|
|
|
.nav-text {
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.admin-content {
|
|
padding: 10px;
|
|
}
|
|
|
|
.admin-section {
|
|
padding: 10px;
|
|
}
|
|
|
|
.admin-sidebar {
|
|
padding: 10px;
|
|
}
|
|
|
|
.admin-nav a {
|
|
padding: 6px 10px;
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.header .header-actions .btn {
|
|
padding: 5px 8px;
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
.admin-info {
|
|
display: none;
|
|
}
|
|
|
|
.admin-map {
|
|
height: 200px;
|
|
}
|
|
|
|
.walk-sheet-preview .walk-sheet-page {
|
|
transform: scale(0.25);
|
|
transform-origin: center top;
|
|
margin-bottom: -750px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group select {
|
|
font-size: 16px; /* Prevent zoom on iOS */
|
|
}
|
|
|
|
.btn {
|
|
min-height: 44px;
|
|
padding: 10px 16px;
|
|
}
|
|
|
|
.btn-sm {
|
|
min-height: 36px;
|
|
padding: 8px 12px;
|
|
}
|
|
}
|
|
|
|
/* Ultra Small Screens (under 360px) */
|
|
@media (max-width: 360px) {
|
|
.admin-sidebar {
|
|
width: 240px !important; /* Added !important */
|
|
left: -260px !important; /* Increased to ensure complete hiding */
|
|
}
|
|
|
|
.admin-sidebar.active {
|
|
left: 0 !important;
|
|
}
|
|
|
|
.admin-nav a {
|
|
padding: 8px;
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
|
|
.nav-icon {
|
|
font-size: var(--font-size-sm);
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.nav-text {
|
|
font-size: var(--font-size-xs);
|
|
}
|
|
}
|
|
|
|
/* Tablet Responsive (768px - 1024px) */
|
|
@media (max-width: 1024px) and (min-width: 769px) {
|
|
.admin-sidebar {
|
|
width: var(--sidebar-width-tablet);
|
|
min-width: var(--sidebar-width-tablet);
|
|
max-width: var(--sidebar-width-tablet);
|
|
padding: 15px;
|
|
}
|
|
|
|
.admin-content {
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.admin-section {
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.users-admin-container {
|
|
grid-template-columns: 1fr;
|
|
gap: var(--padding-base);
|
|
}
|
|
|
|
.shifts-admin-container {
|
|
grid-template-columns: 1fr;
|
|
gap: var(--padding-base);
|
|
}
|
|
|
|
.user-form,
|
|
.users-list {
|
|
padding: var(--padding-base);
|
|
}
|
|
|
|
.users-table {
|
|
font-size: var(--font-size-sm);
|
|
}
|
|
|
|
.users-table th,
|
|
.users-table td {
|
|
padding: 10px 8px;
|
|
}
|
|
}
|
|
|
|
/* Small Laptop (1024px - 1200px) */
|
|
@media (max-width: 1200px) and (min-width: 1025px) {
|
|
.admin-sidebar {
|
|
width: var(--sidebar-width-tablet);
|
|
min-width: var(--sidebar-width-tablet);
|
|
max-width: var(--sidebar-width-tablet);
|
|
}
|
|
|
|
.users-admin-container,
|
|
.shifts-admin-container {
|
|
grid-template-columns: 1fr 1.5fr;
|
|
gap: 25px;
|
|
}
|
|
|
|
.walk-sheet-container {
|
|
display: flex !important;
|
|
flex-direction: column !important;
|
|
gap: var(--padding-base);
|
|
}
|
|
|
|
.walk-sheet-config {
|
|
order: 1 !important;
|
|
margin-bottom: var(--padding-base);
|
|
}
|
|
|
|
.walk-sheet-preview {
|
|
order: 2 !important;
|
|
padding: var(--padding-base);
|
|
min-height: auto;
|
|
max-width: 100vw;
|
|
overflow-x: auto;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.walk-sheet-preview .walk-sheet-page {
|
|
transform: scale(0.75);
|
|
transform-origin: center top;
|
|
margin-bottom: -200px;
|
|
max-width: 100%;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 1000px) {
|
|
.walk-sheet-preview .walk-sheet-page {
|
|
transform: scale(0.5);
|
|
transform-origin: center top;
|
|
margin-bottom: -400px;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.cuts-map-section {
|
|
height: 400px;
|
|
}
|
|
|
|
.cuts-filters {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* Header Responsive */
|
|
@media (max-width: 1024px) {
|
|
.header {
|
|
padding: 10px 15px;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: var(--padding-base);
|
|
}
|
|
|
|
.header .header-actions {
|
|
gap: 8px;
|
|
}
|
|
}
|
|
|
|
/* Responsive Table for Very Small Screens */
|
|
@media (max-width: 640px) {
|
|
.users-table {
|
|
border: 0;
|
|
}
|
|
|
|
.users-table thead {
|
|
border: none;
|
|
clip: rect(0 0 0 0);
|
|
height: 1px;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute;
|
|
width: 1px;
|
|
}
|
|
|
|
.users-table tr {
|
|
border-bottom: 3px solid #ddd;
|
|
display: block;
|
|
margin-bottom: 10px;
|
|
padding: 10px;
|
|
background: #f8f9fa;
|
|
border-radius: var(--border-radius);
|
|
}
|
|
|
|
.users-table td {
|
|
border: none;
|
|
border-bottom: 1px solid #eee;
|
|
display: block;
|
|
font-size: var(--font-size-sm);
|
|
text-align: right;
|
|
padding: 8px 10px;
|
|
}
|
|
|
|
.users-table td::before {
|
|
content: attr(data-label);
|
|
float: left;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
font-size: 11px;
|
|
color: #666;
|
|
}
|
|
|
|
.users-table td:last-child {
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.user-actions {
|
|
justify-content: flex-end;
|
|
margin-top: 8px;
|
|
gap: 6px;
|
|
}
|
|
|
|
.user-communication-actions {
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.user-communication-actions .btn {
|
|
min-width: 32px;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.user-admin-actions .btn {
|
|
width: auto !important;
|
|
min-width: 80px;
|
|
flex: none;
|
|
font-size: 10px;
|
|
padding: 6px 8px;
|
|
}
|
|
}
|