upskill-event-manager/assets/css/hvac-modal-forms.css
ben 00f88070b8 fix: resolve trainer event creation page issues and implement modal forms
- Fix AI Assistant timeout issue (frontend: 35s → 50s)
- Fix AJAX action name mismatch for categories (categorys → categories)
- Fix nonce mismatch (hvac_general_nonce → hvac_ajax_nonce)
- Add modal forms for creating new organizers, categories, and venues
- Add comprehensive AJAX endpoints with security validation
- Implement role-based permissions for category creation
- Fix searchable selectors action mapping

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 16:07:56 -03:00

389 lines
No EOL
6.8 KiB
CSS

/**
* HVAC Modal Forms Styling
*
* Styles for modal dialogs used to create new organizers, categories, and venues.
*/
/* Modal Overlay */
.hvac-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
box-sizing: border-box;
}
/* Modal Content */
.hvac-modal-content {
background: white;
border-radius: 8px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
max-width: 600px;
width: 100%;
max-height: 90vh;
overflow: hidden;
position: relative;
animation: hvacModalSlideIn 0.3s ease-out;
}
@keyframes hvacModalSlideIn {
from {
transform: translateY(-50px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* Modal Header */
.hvac-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 24px;
border-bottom: 1px solid #e0e0e0;
background: #f8f9fa;
}
.hvac-modal-title {
margin: 0;
font-size: 20px;
font-weight: 600;
color: #333;
}
.hvac-modal-close {
background: none;
border: none;
font-size: 28px;
font-weight: 300;
color: #666;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s ease;
}
.hvac-modal-close:hover {
background: #e9ecef;
color: #333;
}
.hvac-modal-close:focus {
outline: 2px solid #0274be;
outline-offset: 2px;
}
/* Modal Body */
.hvac-modal-body {
padding: 24px;
max-height: calc(90vh - 120px);
overflow-y: auto;
}
/* Form Fields */
.hvac-form-fields {
margin-bottom: 24px;
}
.hvac-form-field {
margin-bottom: 20px;
}
.hvac-form-field label {
display: block;
margin-bottom: 6px;
font-weight: 500;
color: #333;
font-size: 14px;
}
.hvac-form-field .required {
color: #d63638;
margin-left: 2px;
}
.hvac-form-field input,
.hvac-form-field textarea {
width: 100%;
padding: 12px 16px;
border: 2px solid #ddd;
border-radius: 4px;
font-size: 16px;
transition: border-color 0.3s ease;
box-sizing: border-box;
}
.hvac-form-field input:focus,
.hvac-form-field textarea:focus {
outline: none;
border-color: #0274be;
box-shadow: 0 0 0 3px rgba(2, 116, 190, 0.1);
}
.hvac-form-field textarea {
resize: vertical;
min-height: 80px;
font-family: inherit;
}
/* Permission Error */
.hvac-permission-error {
text-align: center;
padding: 20px;
}
.hvac-permission-error p {
margin: 0 0 16px 0;
color: #666;
}
.hvac-permission-error p:first-child {
color: #d63638;
font-size: 18px;
margin-bottom: 12px;
}
/* Modal Actions */
.hvac-modal-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
padding-top: 20px;
border-top: 1px solid #e0e0e0;
}
/* Buttons */
.hvac-btn {
padding: 12px 24px;
border: none;
border-radius: 4px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
min-width: 100px;
}
.hvac-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.hvac-btn-primary {
background: #0274be;
color: white;
}
.hvac-btn-primary:hover:not(:disabled) {
background: #025a9b;
}
.hvac-btn-primary:focus {
outline: 2px solid #0274be;
outline-offset: 2px;
}
.hvac-btn-secondary {
background: #f8f9fa;
color: #333;
border: 1px solid #ddd;
}
.hvac-btn-secondary:hover:not(:disabled) {
background: #e9ecef;
border-color: #bbb;
}
.hvac-btn-secondary:focus {
outline: 2px solid #666;
outline-offset: 2px;
}
/* Notifications */
.hvac-notification {
position: fixed;
top: 20px;
right: 20px;
background: white;
padding: 16px 20px;
border-radius: 6px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
z-index: 10001;
display: flex;
align-items: center;
gap: 10px;
font-weight: 500;
transform: translateX(400px);
opacity: 0;
transition: all 0.3s ease;
max-width: 350px;
}
.hvac-notification.show {
transform: translateX(0);
opacity: 1;
}
.hvac-notification.hvac-success {
border-left: 4px solid #28a745;
color: #155724;
}
.hvac-notification.hvac-success .dashicons {
color: #28a745;
}
.hvac-notification.hvac-error {
border-left: 4px solid #dc3545;
color: #721c24;
}
.hvac-notification.hvac-error .dashicons {
color: #dc3545;
}
.hvac-notification .dashicons {
font-size: 18px;
width: 18px;
height: 18px;
flex-shrink: 0;
}
/* Responsive Design */
@media (max-width: 768px) {
.hvac-modal-overlay {
padding: 10px;
}
.hvac-modal-content {
max-height: 95vh;
}
.hvac-modal-header {
padding: 16px 20px;
}
.hvac-modal-title {
font-size: 18px;
}
.hvac-modal-body {
padding: 20px;
}
.hvac-modal-actions {
flex-direction: column;
gap: 8px;
}
.hvac-btn {
width: 100%;
justify-content: center;
}
.hvac-form-field input,
.hvac-form-field textarea {
font-size: 16px; /* Prevent zoom on iOS */
}
.hvac-notification {
right: 10px;
left: 10px;
max-width: none;
transform: translateY(-100px);
}
.hvac-notification.show {
transform: translateY(0);
}
}
/* High Contrast Mode Support */
@media (prefers-contrast: high) {
.hvac-modal-content {
border: 3px solid #000;
}
.hvac-form-field input,
.hvac-form-field textarea {
border-width: 3px;
}
.hvac-btn {
border-width: 2px;
}
}
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
.hvac-modal-content {
animation: none;
}
.hvac-notification {
transition: opacity 0.1s ease;
}
@keyframes hvacModalSlideIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
}
/* Focus trap styling */
.hvac-modal-overlay {
/* Ensure modal content receives focus properly */
}
.hvac-modal-content:focus {
outline: none;
}
/* Loading state for submit button */
.hvac-btn:disabled {
position: relative;
}
.hvac-btn:disabled::after {
content: "";
position: absolute;
width: 16px;
height: 16px;
margin: auto;
border: 2px solid transparent;
border-top-color: currentColor;
border-radius: 50%;
animation: hvacButtonSpin 1s ease infinite;
}
@keyframes hvacButtonSpin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}