/**
 * WardMate Dashboard Styles
 * Extracted from js/subapps/dashboard.js for better maintainability
 * @version 3.2.0
 */

/* Dashboard Container */
.dashboard-container {
    padding: 16px;
}

/* Dashboard Quick Actions */
.dash-quick-actions {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.dash-quick-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dash-quick-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.dash-quick-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dashboard Cards */
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.dash-header {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg) 100%);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-header .material-symbols-rounded {
    font-size: 20px;
    color: var(--primary);
}

/* Patient name styling in card header - improved design */
.dash-patient-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-patient-name::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
    margin-right: 4px;
}

/* Dashboard Items */
.dash-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dash-item:last-child {
    border-bottom: none;
}

.dash-item:hover {
    background: var(--bg);
}

.dash-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.dash-item.done {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Dashboard Group Header - Simple style like backup */
.dash-group-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sec);
    margin-top: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 2px;
}

.dash-group-header:first-child {
    margin-top: 0;
}

/* Category group container */
.dash-category-group {
    margin-bottom: 8px;
}

/* Dashboard Notes Tab */
.dash-notes-container {
    padding: 16px;
}

.dash-notes-input-area {
    margin-bottom: 16px;
}

.dash-note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    background: var(--surface);
    color: var(--text);
}

.dash-note-textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-color: var(--primary);
}

.dash-notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-note-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dash-note-item.done {
    opacity: 0.6;
}

.dash-note-item.done .dash-note-text {
    text-decoration: line-through;
}

.dash-note-content {
    flex: 1;
}

.dash-note-text {
    font-size: 14px;
    cursor: pointer;
    word-break: break-word;
}

.dash-note-meta {
    font-size: 12px;
    color: var(--text-sec);
    margin-top: 4px;
}

.dash-note-actions {
    display: flex;
    gap: 4px;
}

/* Dashboard Navigation */
.dash-nav-horizontal {
    display: flex;
    gap: 4px;
    padding: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-nav-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    transition: all 0.2s;
}

.dash-nav-btn:hover {
    background: var(--bg);
}

.dash-nav-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dash-nav-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Dashboard Controls */
.dash-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.dash-date-display {
    font-weight: 600;
    font-size: 14px;
}

/* Empty State */
.dash-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-sec);
}

.dash-empty-state .material-symbols-rounded {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 12px;
}

/* Accessibility: Make interactive elements keyboard-focusable */
.dash-item[tabindex="0"]:focus,
.dash-note-text[tabindex="0"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
