/* Client Portal Styles */

.client-portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.client-portal-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* NOTE: The welcome banner and appointments-preview/section styles shared by the
   home pages now live in static/css/home/home.css (the home framework). */

/* Onboarding Checklist Section */
.checklist-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.checklist-section h2 {
    color: var(--text-color, #333);
    margin-bottom: 1.5rem;
    font-size: var(--text-xl);
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.checklist-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checklist-item.required {
    border-left: 4px solid var(--error-color);
}

.checklist-item.completed {
    border-left: 4px solid var(--success-color);
    background: var(--success-light-bg);
}

.checklist-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-color: white;
}

.checklist-checkbox.checked {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.check-icon {
    width: 14px;
    height: 14px;
    color: white;
    display: block;
}

.checklist-content {
    flex: 1;
}

.checklist-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.checklist-title {
    margin: 0;
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text-color, #333);
}

.required-badge {
    background: var(--error-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
}

.optional-badge {
    background: var(--brand-muted);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
}

.checklist-description {
    margin: 0 0 1rem 0;
    color: #6c757d;
    line-height: var(--leading-normal);
}

/* In-app primary CTA: cream on turquoise, pill (see doc/design.md) */
.checklist-action {
    display: inline-block;
    background: var(--brand-color);
    color: var(--on-dark-color);
    padding: 0.5rem 1.25rem;
    border-radius: var(--border-radius-pill);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out;
}

.checklist-action:hover {
    background: var(--brand-hover);
    color: var(--on-dark-color);
    text-decoration: none;
}

.checklist-action:disabled,
.checklist-action[disabled] {
    opacity: 0.65;
    pointer-events: none;
    border: none;
    cursor: default;
}

.checklist-completed {
    color: var(--success-color);
    font-weight: 500;
    font-size: var(--text-sm);
}

.checklist-tooltip {
    position: relative;
    cursor: help;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.tooltip-icon {
    font-size: var(--text-lg);
    color: #6c757d;
    transition: color 0.3s ease;
}

.checklist-tooltip:hover .tooltip-icon {
    color: var(--primary-color, #007bff);
}

.checklist-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: var(--text-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 300px;
    white-space: normal;
    text-align: center;
}

.checklist-tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.checklist-tooltip:hover::after,
.checklist-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Quick Actions Section */
.quick-actions-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color, #333);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #007bff);
}

.quick-action-icon {
    color: var(--primary-color, #007bff);
    font-size: var(--text-2xl);
}

.quick-action-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color, #333);
}

.quick-action-content p {
    margin: 0;
    color: #6c757d;
    font-size: var(--text-sm);
}

/* NOTE: The appointments-preview / section-header / appointment-card styles
   shared by the home pages now live in static/css/home/home.css.
   The .status-badge variants below remain here because they are used app-wide. */

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
}

.status-badge.confirmed {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.client-confirmed {
    background: #cce5ff;
    color: #004085;
}

.view-all-link {
    text-align: center;
}

/* No Appointments Section */
.no-appointments-section {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-appointments-section h2 {
    color: var(--text-color, #333);
    margin-bottom: 1rem;
}

.no-appointments-section p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Recent Activity */
.recent-activity-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color, #333);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.activity-icon {
    color: var(--primary-color, #007bff);
    font-size: var(--text-xl);
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: var(--text-color, #333);
}

.activity-time {
    font-size: var(--text-sm);
    color: #6c757d;
}

/* Stats Section */
.stats-section {
    margin-bottom: 2rem;
}

.stats-section h2 {
    color: var(--text-color, #333);
    margin-bottom: 1.5rem;
    font-size: var(--text-xl);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-muted));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xl);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-color, #333);
    line-height: var(--leading-none);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--text-sm);
    color: #6c757d;
    font-weight: 500;
}

/* Resources Section */
.resources-section {
    margin-bottom: 2rem;
}

.resources-section h2 {
    color: var(--text-color, #333);
    margin-bottom: 1.5rem;
    font-size: var(--text-xl);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.resource-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.resource-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-muted));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xl);
}

.resource-content {
    flex: 1;
}

.resource-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color, #333);
    font-size: var(--text-md);
    font-weight: 600;
}

.resource-content p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    line-height: var(--leading-normal);
    font-size: var(--text-sm);
}

.resource-link {
    display: inline-block;
    color: var(--brand-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: color 0.15s ease-in-out;
}

.resource-link:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .client-portal-container {
        padding: 1rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

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

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .resource-card {
        padding: 1rem;
    }
}

/* Message Your Provider Section */
.messaging-section {
    margin-top: 0;
}

.messaging-section h2 {
    margin-bottom: 1rem;
}

.messaging-description {
    margin: 0 0 0.75rem 0;
    color: var(--text-secondary, #666);
}

.messaging-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color, #e74c3c);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 10px;
    margin-left: 0.4rem;
}
