Bunch of buag fixes and updates

This commit is contained in:
2025-09-24 12:37:26 -06:00
parent feb2e72c9a
commit f35a1f4be5
33 changed files with 3085 additions and 200 deletions

View File

@@ -370,6 +370,8 @@ header p {
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
box-sizing: border-box;
}
.modal-content {
@@ -434,6 +436,175 @@ header p {
margin-top: 5px;
}
/* Email Preview Modal Styles */
.preview-modal {
max-width: 800px;
max-height: 95vh;
}
.preview-modal .modal-body {
max-height: calc(95vh - 120px);
overflow-y: auto;
}
.preview-section {
margin-bottom: 24px;
}
.preview-section h4 {
color: #005a9c;
margin-bottom: 12px;
font-size: 1.1em;
font-weight: 600;
}
.email-details {
background-color: #f8f9fa;
padding: 16px;
border-radius: 6px;
border: 1px solid #e9ecef;
}
.detail-row {
margin-bottom: 8px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.detail-row:last-child {
margin-bottom: 0;
}
.detail-row strong {
color: #495057;
min-width: 60px;
flex-shrink: 0;
}
.detail-row span {
color: #333;
word-break: break-word;
}
.email-preview-content {
background-color: white;
border: 1px solid #ddd;
border-radius: 6px;
padding: 20px;
max-height: 400px;
overflow-y: auto;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
}
.email-preview-content p {
margin-bottom: 12px;
}
.email-preview-content p:last-child {
margin-bottom: 0;
}
.modal-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
align-items: center;
padding-top: 20px;
border-top: 1px solid #e9ecef;
margin-top: 24px;
}
.email-details {
background-color: #f8f9fa;
padding: 16px;
border-radius: 6px;
border: 1px solid #e9ecef;
}
.detail-row {
margin-bottom: 8px;
display: flex;
flex-wrap: wrap;
}
.detail-row:last-child {
margin-bottom: 0;
}
.detail-row strong {
min-width: 60px;
color: #495057;
font-weight: 600;
}
.detail-row span {
color: #212529;
word-break: break-word;
}
.email-preview-content {
background-color: #ffffff;
border-radius: 6px;
min-height: 200px;
max-height: 600px;
overflow: hidden;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
}
/* Style for iframe email previews */
.email-preview-content iframe {
display: block;
width: 100%;
border: 1px solid #dee2e6;
border-radius: 6px;
background-color: #ffffff;
}
/* Style for text email previews */
.email-preview-content pre {
margin: 0;
padding: 20px;
background-color: #f8f9fa;
border-radius: 6px;
border: 1px solid #dee2e6;
white-space: pre-wrap;
font-family: inherit;
overflow-x: auto;
}
.email-preview-content img {
max-width: 100%;
height: auto;
}
.email-preview-content a {
color: #007bff;
text-decoration: underline;
}
.modal-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid #e9ecef;
}
.btn.btn-outline {
background-color: transparent;
border: 1px solid #6c757d;
color: #6c757d;
}
.btn.btn-outline:hover {
background-color: #6c757d;
color: white;
}
/* Message Display */
.message-display {
position: fixed;
@@ -476,6 +647,23 @@ footer a:hover {
text-decoration: underline;
}
.footer-actions {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #eee;
}
.footer-actions .btn {
font-size: 12px;
padding: 6px 12px;
opacity: 0.8;
transition: opacity 0.2s ease;
}
.footer-actions .btn:hover {
opacity: 1;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
@@ -515,21 +703,365 @@ footer a:hover {
flex-direction: column;
align-items: center;
text-align: center;
gap: 15px;
}
.rep-photo {
width: 100px;
height: 100px;
margin-bottom: 15px;
}
.rep-card .rep-actions {
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
.btn {
.rep-card .rep-actions .btn {
font-size: 14px;
padding: 12px 20px;
width: 100%;
margin: 4px 0;
text-align: center;
justify-content: center;
display: flex;
align-items: center;
}
}
/* Map Styles */
.map-header {
text-align: center;
margin-bottom: 20px;
}
.map-header h2 {
color: #005a9c;
margin: 0;
}
.postal-input-section {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
}
.postal-input-section .form-group {
margin-bottom: 0;
}
.postal-input-section .input-group {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
}
.postal-input-section .input-group input {
flex: 1;
min-width: 200px;
}
.map-container {
background: white;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
overflow: hidden;
margin-bottom: 20px;
position: relative;
}
#main-map {
height: 400px;
width: 100%;
z-index: 1;
}
/* Map message overlay */
.map-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1000;
background: rgba(0, 0, 0, 0.8);
color: white;
padding: 15px 25px;
border-radius: 8px;
font-size: 14px;
text-align: center;
max-width: 300px;
}
/* Office marker styles */
.office-marker {
background: none;
border: none;
}
.office-marker .marker-content {
background: white;
border: 3px solid #005a9c;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transition: all 0.2s ease;
}
.office-marker.federal .marker-content {
border-color: #d32f2f;
background: #ffebee;
}
.office-marker.provincial .marker-content {
border-color: #1976d2;
background: #e3f2fd;
}
.office-marker.municipal .marker-content {
border-color: #388e3c;
background: #e8f5e8;
}
.office-marker:hover .marker-content {
transform: scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* Office popup styles */
.leaflet-popup-content-wrapper {
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.office-popup-content {
font-family: inherit;
max-width: 280px;
}
.office-popup-content .rep-header {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 12px;
border-bottom: 2px solid #eee;
margin-bottom: 12px;
}
.office-popup-content .rep-header.federal {
border-bottom-color: #d32f2f;
}
.office-popup-content .rep-header.provincial {
border-bottom-color: #1976d2;
}
.office-popup-content .rep-header.municipal {
border-bottom-color: #388e3c;
}
.office-popup-content .rep-photo-small {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
border: 2px solid #ddd;
}
.office-popup-content .rep-info h4 {
margin: 0 0 4px 0;
color: #333;
font-size: 16px;
font-weight: 600;
}
.office-popup-content .rep-level {
margin: 0 0 2px 0;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.office-popup-content .rep-header.federal .rep-level {
color: #d32f2f;
}
.office-popup-content .rep-header.provincial .rep-level {
color: #1976d2;
}
.office-popup-content .rep-header.municipal .rep-level {
color: #388e3c;
}
.office-popup-content .rep-district {
margin: 0;
font-size: 13px;
color: #666;
}
.office-popup-content .office-details h5 {
margin: 0 0 8px 0;
color: #333;
font-size: 14px;
font-weight: 600;
}
.office-popup-content .office-details p {
margin: 0 0 6px 0;
font-size: 13px;
line-height: 1.4;
}
.office-popup-content .office-details p:last-child {
margin-bottom: 0;
}
.office-popup-content .office-details a {
color: #005a9c;
text-decoration: none;
}
.office-popup-content .office-details a:hover {
text-decoration: underline;
}
.office-popup-content .office-actions {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid #eee;
}
.office-popup-content .btn-small {
padding: 6px 12px;
font-size: 12px;
font-weight: 500;
}
.office-popup-content .shared-location-note {
margin-top: 4px;
}
.office-popup-content .shared-location-note small {
color: #666;
font-style: italic;
}
/* Visit office buttons */
.visit-office {
display: inline-flex;
flex-direction: column;
align-items: center;
padding: 8px 12px;
margin: 3px;
font-size: 13px;
line-height: 1.3;
min-width: 120px;
max-width: 180px;
width: 180px;
text-align: center;
border: 1px solid #005a9c;
border-radius: 6px;
background: white;
color: #005a9c;
transition: all 0.2s ease;
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
white-space: normal;
}
.visit-office:hover {
background: #005a9c;
color: white;
transform: translateY(-1px);
box-shadow: 0 2px 6px rgba(0, 90, 156, 0.2);
}
.visit-office .office-location {
display: block;
margin-top: 2px;
font-size: 11px;
opacity: 0.8;
font-weight: normal;
word-wrap: break-word;
overflow-wrap: break-word;
hyphens: auto;
line-height: 1.2;
white-space: normal;
width: 100%;
max-width: 100%;
overflow: hidden;
}
.btn-sm {
padding: 6px 12px;
font-size: 12px;
line-height: 1.4;
}
/* Responsive map styles */
@media (max-width: 768px) {
.map-header {
flex-direction: column;
align-items: stretch;
text-align: center;
}
.map-controls {
justify-content: center;
}
#main-map {
height: 300px;
}
.office-popup-content {
max-width: 250px;
}
.office-popup-content .rep-header {
flex-direction: column;
text-align: center;
gap: 8px;
}
}
@media (max-width: 480px) {
#main-map {
height: 250px;
}
.map-controls {
flex-direction: column;
}
.office-popup-content {
max-width: 220px;
}
.visit-office {
max-width: calc(100vw - 40px);
width: auto;
min-width: 140px;
text-align: center;
justify-content: center;
align-items: center;
flex-shrink: 1;
}
.visit-office .office-location {
text-align: center;
width: 100%;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
}