div.clear {
    clear:both;
}

/* Dynamic chart styles - applies to chart[YEAR] divs but NOT totals */
div[id^="chart"]:not([id$="-totals"]):not(#chart-type-btns) {
    max-width: 1200px;
    position: relative;
    margin-bottom: 10px;
    display: none;
}

/* Show chart area only when script marks the container as ready for plotting. */
div[id^="chart"]:not([id$="-totals"]):not(#chart-type-btns).chart-ready {
    display: block;
    min-height: 300px;
    border: 1px solid blue;
}

/* Chart totals styling */
div[id$="-totals"] {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 5px 0 15px 0;
    font-size: 14px;
    font-weight: normal;
    color: #495057;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    /* Force override any inherited height properties */
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
}

/* Style the bold values within totals */
div[id$="-totals"] b {
    color: #007bff;
    font-weight: 600;
}

/* SPA Navigation and Content Styles */
.page-content {
    padding: 15px;
    width: 100%;
    min-height: 400px;
}

.nav-btn {
    margin-left: 5px;
    min-width: 80px;
    text-align: center;
}

.ui-btn-right .nav-btn {
    display: inline-block;
    vertical-align: middle;
}

.active-nav {
    font-weight: bold;
}

/* Proper display control - only show one section at a time */
#dashboard-content {
    display: none;
}

#admin-content {
    display: none;
}

/* When visible, override the default hide */
#dashboard-content.visible {
    display: block !important;
}

#admin-content.visible {
    display: block !important;
}

/* Improve GUID display formatting */
.device-guid {
    font-family: monospace;
    font-size: 0.9em;
}

/* Make tables more responsive */
.ui-table-reflow td {
    word-break: break-all;
    font-size: 0.9em;
}

/* Ensure only one content section shows at a time */
.content-section {
    position: relative;
    width: 100%;
    clear: both;
}

/* Hide content initially until navigation occurs */
.page-content:not(.visible) {
    display: none;
}

/* Quick Time Range Selection Styles */
#quick-time-btns {
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 6px;
    border: 1px solid #ddd;
}

#quick-time-btns label {
    margin-right: 10px;
    align-self: center;
    font-weight: bold;
    color: #333;
}

#quick-minutes-select {
    min-width: 150px;
    margin-right: 10px;
}

/* Single Day Picker Styles */
#day-picker-section {
    display: none;
    margin: 10px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#day-picker-section .ui-fieldcontain {
    margin: 0;
}

#single-day-picker {
    max-width: 200px;
    margin-right: 10px;
}

/* Main button group styling */
#btns {
    margin-bottom: 10px;
}

#btns a {
    margin: 2px;
}

/* Remove white background from quick time range selection controlgroup */
#quick-time-btns.ui-controlgroup {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#quick-time-btns.ui-controlgroup .ui-controlgroup-controls {
    background: transparent !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
}

/* Ensure buttons don't shrink too much */
#quick-time-btns .ui-btn {
    flex-shrink: 0 !important;
    margin: 2px !important;
}

/* Make sure select doesn't take up too much space */
#quick-minutes-select {
    flex-shrink: 1 !important;
    max-width: 180px !important;
}