helix/src/pages/Settings/styles.css
Abhijit Bhatnagar e80316be89 updated react app and API backend
1. Added API backend for settings
2. Added React components for the settings page
3. Added JS lint using @wordpress/scripts
4. Lint fixes for PHP
2025-08-11 01:38:33 +05:30

462 lines
No EOL
7.3 KiB
CSS

/* Helix Settings Page Styles */
.helix-settings-page {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Header */
.helix-settings-header {
margin-bottom: 30px;
text-align: center;
}
.helix-settings-header h1 {
font-size: 2.5rem;
font-weight: 600;
color: #1d4ed8;
margin: 0 0 10px 0;
}
.helix-settings-header p {
font-size: 1.1rem;
color: #6b7280;
margin: 0;
}
/* Loading State */
.helix-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
text-align: center;
}
.helix-loading p {
margin: 20px 0 0 0;
font-size: 1.1rem;
color: #6b7280;
}
/* Spinner */
.helix-spinner {
width: 24px;
height: 24px;
border: 3px solid #e5e7eb;
border-top: 3px solid #1d4ed8;
border-radius: 50%;
animation: spin 1s linear infinite;
display: inline-block;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Controls */
.helix-settings-controls,
.helix-settings-footer {
display: flex;
justify-content: center;
margin: 30px 0;
padding: 20px 0;
border-top: 1px solid #e5e7eb;
}
.helix-settings-footer {
border-bottom: 1px solid #e5e7eb;
margin-top: 50px;
}
/* Save Buttons */
.helix-save-buttons {
display: flex;
align-items: center;
gap: 15px;
}
.helix-btn {
padding: 12px 24px;
font-size: 14px;
font-weight: 500;
border-radius: 8px;
border: 1px solid transparent;
cursor: pointer;
transition: all 0.2s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}
.helix-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.helix-btn-primary {
background-color: #1d4ed8;
color: white;
border-color: #1d4ed8;
}
.helix-btn-primary:hover:not(:disabled) {
background-color: #1e40af;
border-color: #1e40af;
}
.helix-btn-secondary {
background-color: white;
color: #374151;
border-color: #d1d5db;
}
.helix-btn-secondary:hover:not(:disabled) {
background-color: #f9fafb;
border-color: #9ca3af;
}
.helix-save-status {
color: #059669;
font-weight: 500;
display: flex;
align-items: center;
gap: 5px;
}
/* Tabs */
.helix-settings-tabs {
margin: 30px 0;
}
.helix-tabs-nav {
display: flex;
border-bottom: 2px solid #e5e7eb;
overflow-x: auto;
gap: 2px;
}
.helix-tab {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 20px;
font-size: 14px;
font-weight: 500;
color: #6b7280;
background: none;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
position: relative;
}
.helix-tab:hover {
color: #1d4ed8;
background-color: #f8fafc;
}
.helix-tab.active {
color: #1d4ed8;
border-bottom-color: #1d4ed8;
}
.helix-tab-icon {
font-size: 16px;
}
.helix-tab-indicator {
color: #f59e0b;
font-size: 12px;
position: absolute;
top: 5px;
right: 5px;
}
/* Content */
.helix-settings-content {
margin: 40px 0;
}
.helix-tab-panel {
min-height: 400px;
}
/* Settings Sections */
.helix-settings-section {
background: white;
border-radius: 12px;
border: 1px solid #e5e7eb;
overflow: hidden;
margin-bottom: 30px;
}
.helix-settings-section-header {
background: #f8fafc;
padding: 24px;
border-bottom: 1px solid #e5e7eb;
}
.helix-settings-section-title {
font-size: 1.5rem;
font-weight: 600;
color: #111827;
margin: 0 0 8px 0;
}
.helix-settings-section-description {
color: #6b7280;
margin: 0;
font-size: 14px;
}
.helix-settings-section-content {
padding: 24px;
}
.helix-settings-grid {
display: grid;
gap: 24px;
}
.helix-settings-subsection {
border-top: 1px solid #e5e7eb;
padding-top: 24px;
margin-top: 24px;
}
.helix-settings-subsection h4 {
font-size: 1.1rem;
font-weight: 600;
color: #374151;
margin: 0 0 20px 0;
}
/* Form Fields */
.helix-form-field {
display: flex;
flex-direction: column;
gap: 8px;
}
.helix-form-label {
font-weight: 500;
color: #374151;
font-size: 14px;
}
.helix-required {
color: #ef4444;
margin-left: 4px;
}
.helix-form-control {
display: flex;
flex-direction: column;
}
.helix-form-description {
font-size: 13px;
color: #6b7280;
margin: 0;
line-height: 1.4;
}
.helix-form-error {
font-size: 13px;
color: #ef4444;
margin: 0;
}
/* Input Elements */
.helix-text-input,
.helix-number-input,
.helix-select-input {
padding: 10px 12px;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 14px;
transition: border-color 0.2s ease;
background: white;
}
.helix-text-input:focus,
.helix-number-input:focus,
.helix-select-input:focus {
outline: none;
border-color: #1d4ed8;
box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
.helix-select-input {
cursor: pointer;
}
/* Toggle Input */
.helix-toggle-field {
margin: 16px 0;
}
.helix-toggle-wrapper {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
}
.helix-toggle-input {
position: relative;
width: 48px;
height: 24px;
appearance: none;
background: #d1d5db;
border-radius: 12px;
outline: none;
cursor: pointer;
transition: background-color 0.2s ease;
}
.helix-toggle-input:checked {
background: #1d4ed8;
}
.helix-toggle-input::before {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
background: white;
border-radius: 50%;
transition: transform 0.2s ease;
}
.helix-toggle-input:checked::before {
transform: translateX(24px);
}
.helix-toggle-label {
font-weight: 500;
color: #374151;
font-size: 14px;
}
/* Notifications */
.helix-notification {
background: white;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 16px;
margin: 20px 0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
opacity: 0;
transform: translateY(-10px);
transition: all 0.3s ease;
}
.helix-notification.visible {
opacity: 1;
transform: translateY(0);
}
.helix-notification-success {
border-left: 4px solid #059669;
background-color: #f0fdf4;
}
.helix-notification-error {
border-left: 4px solid #ef4444;
background-color: #fef2f2;
}
.helix-notification-warning {
border-left: 4px solid #f59e0b;
background-color: #fffbeb;
}
.helix-notification-info {
border-left: 4px solid #1d4ed8;
background-color: #eff6ff;
}
.helix-notification-content {
display: flex;
align-items: center;
gap: 12px;
}
.helix-notification-icon {
font-size: 18px;
flex-shrink: 0;
}
.helix-notification-message {
flex: 1;
font-size: 14px;
color: #374151;
}
.helix-notification-close {
background: none;
border: none;
font-size: 20px;
color: #6b7280;
cursor: pointer;
padding: 0;
line-height: 1;
flex-shrink: 0;
}
.helix-notification-close:hover {
color: #374151;
}
/* Responsive Design */
@media (max-width: 768px) {
.helix-settings-page {
padding: 15px;
}
.helix-settings-header h1 {
font-size: 2rem;
}
.helix-tabs-nav {
flex-direction: column;
gap: 0;
}
.helix-tab {
justify-content: flex-start;
border-bottom: 1px solid #e5e7eb;
border-right: none;
}
.helix-tab.active {
border-bottom-color: #e5e7eb;
border-left: 3px solid #1d4ed8;
background-color: #f8fafc;
}
.helix-settings-section-content,
.helix-settings-section-header {
padding: 20px;
}
.helix-save-buttons {
flex-direction: column;
width: 100%;
}
.helix-btn {
width: 100%;
justify-content: center;
}
}