/* ============================================================================
   MULTI-OWNER ACTION SUPPORT STYLES
   Extension for action-log-redesign.css
   ============================================================================ */

/* ============================================================================
   SHARED ACTION GROUP CONTAINER
   ============================================================================ */

.shared-action-group {
    background: white;
    border-radius: 10px;
    border-left: 5px solid transparent;
    padding: 1.25rem;
    transition: all 0.2s;
    position: relative;
}

.shared-action-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.shared-action-group.expanded {
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.shared-action-group.completed {
    border-left-color: #4CAF50;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.1) 0%, white 5%);
    opacity: 0.85;
}

.shared-action-group.in-progress {
    border-left-color: #FFC107;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.1) 0%, white 5%);
}

.shared-action-group.partially-completed {
    border-left-color: #FF9800;
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.1) 0%, white 5%);
}

/* ============================================================================
   SHARED ACTION HEADER (Collapsed View)
   ============================================================================ */

.shared-action-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    margin: -1.25rem;
    padding: 1.25rem;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.shared-action-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.shared-action-expand-icon {
    font-size: 14px;
    color: #757575;
    transition: transform 0.2s ease;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.shared-action-expand-icon.expanded {
    transform: rotate(0deg);
}

.shared-action-main {
    flex: 1;
    min-width: 0;
}

.shared-action-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.shared-action-id {
    background: #667EEA;
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.shared-action-description {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2C3E50;
    line-height: 1.5;
}

.shared-action-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shared-action-topic {
    font-size: 13px;
    color: #616161;
    background: #F5F5F5;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ============================================================================
   PROGRESS INDICATORS
   ============================================================================ */

.shared-action-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.multi-owner-progress-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFF;
    border: 2px solid #E0E0E0;
    border-radius: 20px;
    padding: 6px 12px;
}

.progress-dots {
    display: flex;
    gap: 4px;
}

.progress-dot {
    font-size: 16px;
    line-height: 1;
}

.progress-dot.completed {
    color: #4CAF50;
}

.progress-dot.pending {
    color: #BDBDBD;
}

.progress-text {
    font-size: 13px;
    font-weight: 700;
    color: #424242;
    font-variant-numeric: tabular-nums;
}

/* ============================================================================
   OWNER AVATARS (Collapsed View)
   ============================================================================ */

.shared-action-owners-collapsed {
    display: flex;
    align-items: center;
    gap: -8px; /* Overlap effect */
    margin-left: 8px;
}

.owner-avatar-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #616161;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: -8px;
    transition: transform 0.2s ease;
}

.owner-avatar-more:hover {
    transform: scale(1.1);
    z-index: 10;
    background: #BDBDBD;
}

.owner-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #FFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.owner-avatar:hover {
    transform: scale(1.1);
    z-index: 10;
}

.owner-avatar.status-completed {
    border-color: #4CAF50;
}

.owner-avatar.status-pending {
    border-color: #FF9800;
}

.owner-avatar.current-user {
    border-color: #2196F3;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.avatar-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFF;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
}

.avatar-status-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #FFF;
}

.status-completed .avatar-status-indicator {
    background: #4CAF50;
}

.status-pending .avatar-status-indicator {
    background: #FF9800;
}

/* ============================================================================
   EXPANDED VIEW - OWNER ROWS
   ============================================================================ */

.shared-action-body {
    padding: 12px 16px 16px 16px;
    border-top: 1px solid #F0F0F0;
    background: #F9FAFB;
}

.owner-row {
    background: #FAFAFA;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.owner-row:last-child {
    margin-bottom: 0;
}

.owner-row:hover {
    background: #FFF;
    border-color: #D0D0D0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.owner-row.completed {
    background: #F6F9F6;
    border-color: #D4E8D4;
    opacity: 0.9;
}

.owner-row.pending {
    background: #FAFAFA;
}

.owner-row.current-user-row {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.owner-row.current-user-row:hover {
    border-color: #1976D2;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.owner-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.owner-row .owner-avatar {
    width: 40px;
    height: 40px;
}

.owner-details {
    flex: 1;
}

.owner-name {
    font-size: 15px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.you-badge {
    background: #DBEAFE;
    color: #1E40AF;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.owner-status {
    font-size: 13px;
    color: #616161;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.completed {
    background: #DCFCE7;
    color: #166534;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #92400E;
}

.owner-completed-date {
    font-size: 12px;
    color: #757575;
    font-style: italic;
}

/* ============================================================================
   OWNER ROW ACTIONS
   ============================================================================ */

.owner-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-complete-owner {
    background: #10B981;
    color: #FFF;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-complete-owner:hover {
    background: #059669;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-complete-owner:active {
    transform: scale(0.98);
}

.btn-action-icon {
    background: transparent;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
}

.btn-action-icon:hover {
    background: #F8F9FA;
    border-color: #CBD5E1;
    color: #475569;
}

.btn-action-icon.btn-delete:hover {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #DC2626;
}

/* ============================================================================
   OWNER NOTES
   ============================================================================ */

.owner-notes {
    margin-top: 10px;
    padding: 10px 12px;
    background: #FFFBEB;
    border-left: 3px solid #FCD34D;
    border-radius: 4px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.notes-icon {
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.notes-text {
    font-size: 13px;
    color: #78716C;
    line-height: 1.5;
    flex: 1;
}

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

@media (max-width: 768px) {
    .shared-action-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shared-action-progress {
        width: 100%;
        justify-content: space-between;
    }

    .owner-row-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-complete-owner {
        width: 100%;
    }

    .multi-owner-progress-badge {
        flex: 1;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.shared-action-body {
    animation: slideDown 0.3s ease;
}

.owner-row {
    animation: slideDown 0.2s ease;
}

/* ============================================================================
   STATUS INDICATORS FOR GROUP
   ============================================================================ */

.shared-action-group.completed .shared-action-header {
    opacity: 0.85;
}

.shared-action-group.partially-completed::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #FF9800 0%, #FFC107 100%);
    border-radius: 12px 0 0 12px;
}

.shared-action-group {
    position: relative;
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.shared-action-header:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

.btn-complete-owner:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .shared-action-group {
        border-width: 3px;
    }

    .owner-avatar {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .shared-action-group,
    .owner-avatar,
    .btn-complete-owner,
    .shared-action-expand-icon {
        transition: none;
    }

    .shared-action-body,
    .owner-row {
        animation: none;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .shared-action-group.expanded .shared-action-body {
        display: block !important;
    }

    .btn-complete-owner {
        display: none;
    }

    .shared-action-expand-icon {
        display: none;
    }
}
