/* Senior Healthcare Associates - Main Stylesheet */

/* Import Bootstrap Icons */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

/* Global Styles */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5;
}

main {
    flex: 1;
}

/* Header & Navigation */
.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.navbar-brand .material-icons {
    margin-right: 8px;
}

.nav-link .material-icons {
    vertical-align: middle;
    margin-right: 4px;
}

/* Cards */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    font-weight: 600;
    background-color: rgba(66, 133, 244, 0.1);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25);
}

.form-label {
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3367d6;
    border-color: #3367d6;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Facility & Patient Selection */
.facility-card, .patient-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.facility-card.selected, .patient-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(66, 133, 244, 0.05);
}

/* Note Creation Form */
.note-form {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.note-form .form-group {
    margin-bottom: 20px;
}

.findings-editor {
    min-height: 200px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px;
}

/* Email Recipients */
.email-recipients {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 15px;
    background-color: #f8f9fa;
}

.email-checkbox {
    margin-bottom: 10px;
}

/* Status Indicators */
#online-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    letter-spacing: 0.03em;
    color: white !important; /* Ensure text is always white */
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3); /* Add slight shadow for better contrast */
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    animation: pulse 2s infinite;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); /* Add slight shadow for better visibility */
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Offline status styling */
#online-status.bg-danger .status-dot {
    animation: none;
    opacity: 0.8;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-columns {
        column-count: 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Print Styles for PDF Preview */
@media print {
    body {
        background-color: white;
    }
    
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}

/* Authentication Styles */
.auth-card {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.auth-logo {
    max-height: 80px;
    margin-bottom: 1.5rem;
}

.auth-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: #495057;
}

.auth-form .input-group {
    margin-bottom: 0.5rem;
}

.auth-form .input-group-text {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(66, 133, 244, 0.25);
}

.auth-form .btn-primary {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.auth-divider span {
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-message {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.password-requirements {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.password-requirements ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}
