/* ==========================================================================
   Case Activity Timeline
   Enhanced timeline design with connector line and modern cards
   ========================================================================== */

/* Container */
.is-activity-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .is-activity-section {
        grid-template-columns: 1fr;
    }
}

/* Timeline Container */
.is-activity-timeline {
    position: relative;
    padding-left: 28px;
}

.is-activity-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #5DC2D3 0%, #e5e7eb 100%);
    border-radius: 2px;
}

.dark .is-activity-timeline::before {
    background: linear-gradient(180deg, #5DC2D3 0%, rgb(51, 65, 85) 100%);
}

/* Timeline Item */
.is-activity-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.is-activity-item:hover {
    border-color: #5DC2D3;
    box-shadow: 0 4px 12px rgba(93, 194, 211, 0.15);
    transform: translateY(-1px);
}

.is-activity-item:last-child {
    margin-bottom: 0;
}

.dark .is-activity-item {
    background: rgb(30, 41, 59);
    border-color: rgb(51, 65, 85);
}

.dark .is-activity-item:hover {
    border-color: #5DC2D3;
    box-shadow: 0 4px 12px rgba(93, 194, 211, 0.2);
}

/* Timeline Dot */
.is-activity-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 1.25rem;
    width: 12px;
    height: 12px;
    background: #5DC2D3;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #5DC2D3;
    z-index: 1;
}

.dark .is-activity-item::before {
    border-color: rgb(30, 41, 59);
}

/* Completed Activity */
.is-activity-item.is-activity-completed::before {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}

/* Overdue Activity */
.is-activity-item.is-activity-overdue::before {
    background: #ef4444;
    box-shadow: 0 0 0 2px #ef4444;
    animation: pulse-overdue 2s infinite;
}

@keyframes pulse-overdue {
    0%, 100% { box-shadow: 0 0 0 2px #ef4444; }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3); }
}

/* Activity Header */
.is-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.is-activity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.is-activity-time {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
}

.dark .is-activity-time {
    color: #64748b;
}

/* Activity Subject */
.is-activity-subject {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.dark .is-activity-subject {
    color: #f1f5f9;
}

/* Activity Description */
.is-activity-description {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-left: 3px solid #5DC2D3;
    border-radius: 0 6px 6px 0;
    margin: 0.5rem 0;
}

.dark .is-activity-description {
    background: rgb(51, 65, 85);
    color: #94a3b8;
}

/* Activity Meta Row */
.is-activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.dark .is-activity-meta {
    border-top-color: rgb(51, 65, 85);
}

.is-activity-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.is-activity-info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.is-activity-info-item svg {
    width: 14px;
    height: 14px;
}

.dark .is-activity-info-item {
    color: #94a3b8;
}

.is-activity-info-item.is-info-danger {
    color: #ef4444;
}

.is-activity-info-item.is-info-primary {
    color: #5DC2D3;
}

.is-activity-info-item.is-activity-creator-inline {
    color: #9ca3af;
    margin-left: auto;
    padding-left: 1rem;
}

.dark .is-activity-info-item.is-activity-creator-inline {
    color: #64748b;
}

/* Activity Actions */
.is-activity-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Complete Button */
.is-activity-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #059669;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.is-activity-complete-btn:hover {
    background: #a7f3d0;
    border-color: #34d399;
}

.is-activity-complete-btn svg {
    width: 14px;
    height: 14px;
}

.dark .is-activity-complete-btn {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.dark .is-activity-complete-btn:hover {
    background: rgba(16, 185, 129, 0.25);
}

/* Completed Status */
.is-activity-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.is-activity-status.is-status-completed {
    color: #10b981;
}

.is-activity-status.is-status-completed svg {
    width: 14px;
    height: 14px;
}

/* Activity Creator */
.is-activity-creator {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

.dark .is-activity-creator {
    color: #64748b;
}

/* ==========================================================================
   Log Activity Form
   ========================================================================== */

.is-activity-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.dark .is-activity-form {
    background: rgb(30, 41, 59);
    border-color: rgb(51, 65, 85);
}

.is-activity-form-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #5DC2D3;
}

.is-activity-form-header svg {
    width: 18px;
    height: 18px;
    color: #5DC2D3;
}

.dark .is-activity-form-header {
    color: #f1f5f9;
}

/* Form Fields */
.is-activity-form .is-form-group {
    margin-bottom: 1rem;
}

.is-activity-form .is-form-group:last-of-type {
    margin-bottom: 1.25rem;
}

.is-activity-form .is-form-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.dark .is-activity-form .is-form-label {
    color: #d1d5db;
}

.is-activity-form .is-form-required::after {
    content: ' *';
    color: #ef4444;
}

.is-activity-form .is-form-input,
.is-activity-form .is-form-select,
.is-activity-form .is-form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.is-activity-form .is-form-input:focus,
.is-activity-form .is-form-select:focus,
.is-activity-form .is-form-textarea:focus {
    outline: none;
    border-color: #5DC2D3;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(93, 194, 211, 0.15);
}

.dark .is-activity-form .is-form-input,
.dark .is-activity-form .is-form-select,
.dark .is-activity-form .is-form-textarea {
    background: rgb(51, 65, 85);
    border-color: rgb(71, 85, 105);
    color: #f1f5f9;
}

.dark .is-activity-form .is-form-input:focus,
.dark .is-activity-form .is-form-select:focus,
.dark .is-activity-form .is-form-textarea:focus {
    background: rgb(30, 41, 59);
    border-color: #5DC2D3;
}

.is-activity-form .is-form-hint {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.dark .is-activity-form .is-form-hint {
    color: #64748b;
}

/* Submit Button */
.is-activity-form .is-btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #5DC2D3 0%, #4aa8b8 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.is-activity-form .is-btn-submit:hover {
    background: linear-gradient(135deg, #4aa8b8 0%, #3d8a96 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(93, 194, 211, 0.3);
}

.is-activity-form .is-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.is-activity-form .is-btn-submit svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.is-activity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.dark .is-activity-empty {
    background: rgb(30, 41, 59);
    border-color: rgb(51, 65, 85);
}

.is-activity-empty svg {
    width: 48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.dark .is-activity-empty svg {
    color: rgb(71, 85, 105);
}

.is-activity-empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.dark .is-activity-empty-title {
    color: #94a3b8;
}

.is-activity-empty-text {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.dark .is-activity-empty-text {
    color: #64748b;
}

/* ==========================================================================
   Section Label Enhancement
   ========================================================================== */

.is-activity-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.is-activity-section-label svg {
    width: 16px;
    height: 16px;
    color: #5DC2D3;
}

.dark .is-activity-section-label {
    color: #e2e8f0;
}
