Spaces:
Running

backend / app /static /css /dashboard /dateRangePicker.css
paisaly's picture
Upload 1776 files
25834e9 verified
Raw History Blame Contribute Delete
11.1 kB
/* Date Range Picker Styles */
.date-range-picker {
position: relative;
display: inline-block;
}
.date-range-trigger {
padding: 8px 14px;
border-radius: 8px;
color: rgba(255, 255, 255, 0.85);
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.12);
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
min-width: 160px;
transition: all 0.2s ease;
font-weight: 500;
}
.date-range-trigger:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.95);
}
.date-range-trigger.active {
background: rgba(124, 58, 237, 0.15);
border-color: rgba(124, 58, 237, 0.4);
color: rgba(255, 255, 255, 0.95);
}
.selected-range {
flex: 1;
font-size: 14px;
}
.clock-icon {
font-size: 16px;
color: rgba(255, 255, 255, 0.7);
}
.dropdown-icon {
font-size: 12px;
color: rgba(255, 255, 255, 0.6);
transition: transform 0.2s ease;
}
.date-range-trigger.active .dropdown-icon {
transform: rotate(180deg);
color: rgba(255, 255, 255, 0.8);
}
.date-range-dropdown {
position: absolute;
top: calc(100% + 10px);
right: 0;
left: auto;
background: rgba(15, 20, 35, 0.95);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 12px;
box-shadow: rgba(0, 0, 0, 0.3) 0 20px 40px 0px;
backdrop-filter: blur(16px);
z-index: var(--z-overlay);
min-width: 700px;
max-height: 500px;
overflow: hidden;
display: none;
}
.date-range-dropdown[style*="display: block"],
.date-range-dropdown[style*="display:block"] {
display: block !important;
animation: slideDown 0.15s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dropdown-content {
position: relative;
}
.content-layout {
display: flex;
min-height: 400px;
}
.relative-section {
flex: 0.6;
border-right: 1px solid rgba(255, 255, 255, 0.1);
padding: 20px;
}
.custom-section {
flex: 1.4;
padding: 20px;
display: flex;
flex-direction: column;
}
.section-title {
color: white;
margin: 0 0 15px 0;
font-size: 16px;
font-weight: 500;
}
/* Relative Section */
.relative-options {
max-height: 380px;
overflow-y: auto;
/* Hide scrollbar */
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* IE and Edge */
}
.relative-options::-webkit-scrollbar {
display: none;
/* Chrome, Safari, Opera */
}
.relative-option {
padding: 12px 16px;
color: rgba(255, 255, 255, 0.8);
cursor: pointer;
border-radius: 6px;
margin-bottom: 2px;
transition: all 0.2s ease;
font-size: 14px;
}
.relative-option:hover {
background: rgba(255, 255, 255, 0.1);
color: white;
}
.relative-option.selected {
background: rgba(124, 58, 237, 0.3);
color: white;
border-left: 3px solid var(--accent-primary);
}
/* Custom Section */
.custom-inputs {
margin-bottom: 20px;
}
.input-row {
display: flex;
gap: 15px;
margin-bottom: 15px;
}
.input-row .input-group {
flex: 1;
margin-bottom: 0;
}
.history-section {
flex: 1;
overflow-y: auto;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 5px;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.input-group input {
width: 100%;
padding: 10px 12px;
border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 6px;
background: rgba(255, 255, 255, 0.1);
color: white;
font-size: 14px;
font-family: 'Courier New', monospace;
transition: all 0.2s ease;
}
.input-group input:focus {
outline: none;
border-color: var(--accent-primary);
background: rgba(255, 255, 255, 0.15);
}
.input-group input.invalid:focus {
border-color: var(--color-danger);
background: rgba(239, 68, 68, 0.1);
}
.input-group input::placeholder {
color: rgba(255, 255, 255, 0.4);
font-style: italic;
}
.apply-btn {
padding: 10px 20px;
background: var(--accent-primary);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background-color 0.2s ease;
width: 100%;
margin-top: 10px;
}
.apply-btn:hover {
background: var(--accent-primary);
}
.apply-btn:disabled {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.5);
cursor: not-allowed;
}
.history-section h4 {
color: white;
margin: 0 0 15px 0;
font-size: 14px;
font-weight: 500;
}
.history-list {
display: flex;
flex-direction: column;
gap: 2px;
overflow-y: scroll;
max-height: 205px;
}
.history-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
border-radius: 6px;
transition: all 0.2s ease;
font-size: 13px;
}
.history-item:hover {
background: rgba(255, 255, 255, 0.1);
color: white;
}
.history-icon {
font-size: 14px;
opacity: 0.7;
}
.history-empty {
color: rgba(255, 255, 255, 0.5);
text-align: center;
padding: 20px;
font-style: italic;
font-size: 13px;
}
/* Scrollbar Styling */
.relative-options::-webkit-scrollbar,
.history-section::-webkit-scrollbar {
width: 6px;
}
.relative-options::-webkit-scrollbar-track,
.history-section::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
}
.relative-options::-webkit-scrollbar-thumb,
.history-section::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 3px;
}
.relative-options::-webkit-scrollbar-thumb:hover,
.history-section::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
/* Animation removed - using transition instead */
/* Responsive adjustments */
@media (max-width: 768px) {
/* Mobile Bottom Sheet for Date Range Picker */
.date-range-dropdown {
position: fixed !important;
top: auto !important;
right: 0 !important;
left: 0 !important;
bottom: 0 !important;
width: 100% !important;
max-width: 100% !important;
min-width: unset !important;
max-height: 70vh;
background: linear-gradient(180deg, rgba(20, 25, 40, 0.95), rgba(15, 20, 35, 0.98));
backdrop-filter: blur(40px) saturate(150%);
-webkit-backdrop-filter: blur(40px) saturate(150%);
border-radius: 24px 24px 0 0;
border: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: none;
box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5),
0 -2px 20px rgba(124, 58, 237, 0.1);
/* Animation for smooth slide-up */
display: block !important;
visibility: hidden;
opacity: 0;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
visibility 0s linear 0.3s;
z-index: var(--z-modal) !important;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
/* Hide scrollbar */
scrollbar-width: none;
/* Firefox */
-ms-overflow-style: none;
/* IE and Edge */
}
/* Hide scrollbar for Chrome, Safari and Opera */
.date-range-dropdown::-webkit-scrollbar {
display: none;
}
.date-range-dropdown[style*="display: block"],
.date-range-dropdown[style*="display:block"] {
visibility: visible !important;
opacity: 1 !important;
transform: translateY(0) !important;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
visibility 0s linear 0s;
}
/* Functional handle: swipe down or tap to dismiss. */
.date-range-dropdown .sheet-handle {
display: flex;
justify-content: center;
align-items: center;
height: 20px;
width: 100%;
touch-action: none;
cursor: grab;
user-select: none;
position: sticky;
top: 0;
background: rgba(15, 20, 35, 0.98);
z-index: 10;
}
.date-range-dropdown .sheet-handle::before {
content: '';
width: 36px;
height: 4px;
border-radius: 2px;
background: rgba(255, 255, 255, 0.3);
transition: background 0.2s ease;
}
.date-range-dropdown .sheet-handle:active {
cursor: grabbing;
}
.date-range-dropdown .sheet-handle:active::before {
background: rgba(255, 255, 255, 0.5);
}
/* Backdrop overlay */
.date-range-dropdown::after {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(15, 20, 35, 0.95);
z-index: -1;
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}
.date-range-dropdown[style*="display: block"]::after,
.date-range-dropdown[style*="display:block"]::after {
opacity: 1;
pointer-events: auto;
}
.content-layout {
flex-direction: column;
min-height: auto;
}
.relative-section {
flex: 1;
border-right: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
max-height: 300px;
overflow-y: auto;
/* Hide scrollbar in relative section */
scrollbar-width: none;
-ms-overflow-style: none;
}
.relative-section::-webkit-scrollbar {
display: none;
}
.custom-section {
flex: 1;
}
/* Hide only history section on mobile */
.history-section {
display: none !important;
}
.dropdown-header {
flex-direction: column;
gap: 12px;
padding: 20px 20px 16px;
}
.custom-inputs {
padding: 20px;
}
}
/* Dark theme consistency */
.date-range-picker * {
box-sizing: border-box;
}
/* Focus states for accessibility */
.tab-btn:focus,
.relative-option:focus,
.history-item:focus,
.apply-btn:focus {
outline: 2px solid var(--accent-primary);
outline-offset: 2px;
}
/* Error states */
.input-error {
color: var(--color-danger);
font-size: 12px;
margin-top: 5px;
display: block;
}