/**
 * Eldercare CSS Styles
 * Styling for ownership selection, trusted circle, and wellness features
 */

/* =============================================================================
   CLAIM CODE LINK
   ============================================================================= */

.claim-link-container {
    margin-top: 1.5rem;
    text-align: center;
}

.claim-link {
    color: var(--primary-color, #4f9cf9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.claim-link:hover {
    color: var(--primary-hover, #3a8ce8);
    text-decoration: underline;
}

/* =============================================================================
   OWNERSHIP MODAL
   ============================================================================= */

.eldercare-modal {
    max-width: 600px;
}

.modal-intro {
    color: var(--text-secondary, #a0a0a0);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.ownership-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ownership-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.ownership-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color, #4f9cf9);
    transform: translateY(-2px);
}

.ownership-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.ownership-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary, #ffffff);
}

.ownership-card p {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.9rem;
    margin: 0;
}

.ownership-note {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--primary-color, #4f9cf9);
}

/* =============================================================================
   BENEFICIARY FORM
   ============================================================================= */

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* =============================================================================
   DEVICE CLAIM MODAL
   ============================================================================= */

.claim-token-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.claim-token-display code {
    flex: 1;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    color: var(--primary-color, #4f9cf9);
    word-break: break-all;
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: var(--primary-color, #4f9cf9);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: var(--primary-hover, #3a8ce8);
}

.claim-instructions {
    background: rgba(79, 156, 249, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.claim-instructions h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color, #4f9cf9);
}

.claim-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary, #a0a0a0);
}

.claim-instructions li {
    margin-bottom: 0.25rem;
}

.claim-note {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    margin-top: 1rem;
}

/* =============================================================================
   SIDE PANELS (Circle Management, Wellness Dashboard)
   ============================================================================= */

.side-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100vh;
    background: var(--bg-secondary, #1e1e2e);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-panel.active {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.panel-intro {
    color: var(--text-secondary, #a0a0a0);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* =============================================================================
   TRUSTED CIRCLE
   ============================================================================= */

.circle-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.circle-stats .stat {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
}

.invite-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.invite-form h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary, #ffffff);
}

.circle-members-list {
    margin-top: 1rem;
}

.circle-member {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.member-relationship {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
}

.member-email {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
}

.member-status {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.permission-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.permission-silent { color: #888; }
.permission-heartbeat { color: #e74c3c; }
.permission-wellness { color: #3498db; }
.permission-open { color: #2ecc71; }

.invitation-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-accepted { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.status-pending { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.status-declined { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.member-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.emergency-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border-radius: 4px;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--primary-color, #4f9cf9);
    color: white;
}

.btn-small:hover {
    opacity: 0.9;
}

.btn-danger {
    background: #e74c3c;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* =============================================================================
   WELLNESS DASHBOARD
   ============================================================================= */

.wellness-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wellness-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.wellness-stat .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.wellness-stat .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    margin-top: 0.25rem;
}

.streak-good { border-left: 3px solid #2ecc71; }
.streak-ok { border-left: 3px solid #f1c40f; }
.streak-low { border-left: 3px solid #e74c3c; }

.rate-good { border-left: 3px solid #2ecc71; }
.rate-ok { border-left: 3px solid #f1c40f; }
.rate-low { border-left: 3px solid #e74c3c; }

.wellness-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-success {
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-large {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
}

.incapacity-warning {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #e74c3c;
}

.incapacity-warning strong {
    display: block;
    margin-bottom: 0.5rem;
}

.btn-warning {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.wellness-history {
    max-height: 300px;
    overflow-y: auto;
}

.wellness-check-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.wellness-check-item.status-responded {
    border-left: 3px solid #2ecc71;
}

.wellness-check-item.status-missed {
    border-left: 3px solid #e74c3c;
}

.wellness-check-item.status-pending {
    border-left: 3px solid #f1c40f;
}

.check-date {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    min-width: 100px;
}

.check-status {
    font-size: 0.85rem;
}

.check-mood {
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
}

.check-note {
    font-size: 0.8rem;
    color: var(--text-muted, #666);
    font-style: italic;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn-primary {
    background: var(--primary-color, #4f9cf9);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover, #3a8ce8);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ffffff);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* =============================================================================
   EMPTY STATES & LOADING
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary, #a0a0a0);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #666);
}

.error {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        right: -100%;
    }

    .ownership-options {
        grid-template-columns: 1fr;
    }

    .wellness-stats {
        grid-template-columns: 1fr;
    }
}
